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 22:29:22 +0200 |
commit | 8957661378b073b49875059d6426614facb0d7f0 (patch) | |
tree | d0ab9bbeb05fc9687b9823876bc1322fd2b35453 /builtin/pull.c | |
parent | config: make git_{config,parse}_maybe_bool equivalent (diff) | |
download | git-8957661378b073b49875059d6426614facb0d7f0.tar.xz git-8957661378b073b49875059d6426614facb0d7f0.zip |
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/pull.c')
-rw-r--r-- | builtin/pull.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/pull.c b/builtin/pull.c index 3ecb881b0b..1c0eb27c37 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -36,7 +36,7 @@ enum rebase_type { static enum rebase_type parse_config_rebase(const char *key, const char *value, int fatal) { - int v = git_config_maybe_bool("pull.rebase", value); + int v = git_parse_maybe_bool(value); if (!v) return REBASE_FALSE; @@ -271,7 +271,7 @@ static const char *config_get_ff(void) if (git_config_get_value("pull.ff", &value)) return NULL; - switch (git_config_maybe_bool("pull.ff", value)) { + switch (git_parse_maybe_bool(value)) { case 0: return "--no-ff"; case 1: |