diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-08-22 10:29:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-22 10:29:03 -0700 |
commit | bdfcdefd2f0587873436c950dd7a0798d313eb34 (patch) | |
tree | a87f56e7da3e2b6bbc93dd6e64a86a4a4801a372 /builtin/log.c | |
parent | Merge branch 'ab/ref-filter-no-contains' (diff) | |
parent | parse_decoration_style: drop unused argument `var` (diff) | |
download | tgif-bdfcdefd2f0587873436c950dd7a0798d313eb34.tar.xz |
Merge branch 'ma/parse-maybe-bool'
Code clean-up.
* ma/parse-maybe-bool:
parse_decoration_style: drop unused argument `var`
treewide: deprecate git_config_maybe_bool, use git_parse_maybe_bool
config: make git_{config,parse}_maybe_bool equivalent
config: introduce git_parse_maybe_bool_text
t5334: document that git push --signed=1 does not work
Doc/git-{push,send-pack}: correct --sign= to --signed=
Diffstat (limited to 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/log.c b/builtin/log.c index 725c7b8a1a..25c8241092 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -58,9 +58,9 @@ static int auto_decoration_style(void) return (isatty(1) || pager_in_use()) ? DECORATE_SHORT_REFS : 0; } -static int parse_decoration_style(const char *var, const char *value) +static int parse_decoration_style(const char *value) { - switch (git_config_maybe_bool(var, value)) { + switch (git_parse_maybe_bool(value)) { case 1: return DECORATE_SHORT_REFS; case 0: @@ -82,7 +82,7 @@ static int decorate_callback(const struct option *opt, const char *arg, int unse if (unset) decoration_style = 0; else if (arg) - decoration_style = parse_decoration_style("command line", arg); + decoration_style = parse_decoration_style(arg); else decoration_style = DECORATE_SHORT_REFS; @@ -412,7 +412,7 @@ static int git_log_config(const char *var, const char *value, void *cb) if (!strcmp(var, "log.date")) return git_config_string(&default_date_mode, var, value); if (!strcmp(var, "log.decorate")) { - decoration_style = parse_decoration_style(var, value); + decoration_style = parse_decoration_style(value); if (decoration_style < 0) decoration_style = 0; /* maybe warn? */ return 0; @@ -824,7 +824,7 @@ static int git_format_config(const char *var, const char *value, void *cb) return 0; } if (!strcmp(var, "format.from")) { - int b = git_config_maybe_bool(var, value); + int b = git_parse_maybe_bool(value); free(from); if (b < 0) from = xstrdup(value); |