diff options
author | Martin Ågren <martin.agren@gmail.com> | 2017-08-07 20:20:49 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-07 13:29:22 -0700 |
commit | 8957661378b073b49875059d6426614facb0d7f0 (patch) | |
tree | d0ab9bbeb05fc9687b9823876bc1322fd2b35453 /builtin/log.c | |
parent | 4666741823239ed45ce9a63914dfd3c1601cf868 (diff) | |
download | git-8957661378b073b49875059d6426614facb0d7f0.tar.gz |
treewide: deprecate git_config_maybe_bool, use git_parse_maybe_bool
The only difference between these is that the former takes an argument
`name` which it ignores completely. Still, the callers are quite careful
to provide reasonable values for it.
Once in-flight topics have landed, we should be able to remove
git_config_maybe_bool. In the meantime, document it as deprecated in the
technical documentation. While at it, document git_parse_maybe_bool.
Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/log.c b/builtin/log.c index 55d20cc2d8..c9564da84f 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -54,7 +54,7 @@ struct line_opt_callback_data { static int parse_decoration_style(const char *var, const char *value) { - switch (git_config_maybe_bool(var, value)) { + switch (git_parse_maybe_bool(value)) { case 1: return DECORATE_SHORT_REFS; case 0: @@ -809,7 +809,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); |