summaryrefslogtreecommitdiff
path: root/submodule-config.c
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2017-08-07 18:20:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-07 20:29:22 (GMT)
commit8957661378b073b49875059d6426614facb0d7f0 (patch)
treed0ab9bbeb05fc9687b9823876bc1322fd2b35453 /submodule-config.c
parent4666741823239ed45ce9a63914dfd3c1601cf868 (diff)
downloadgit-8957661378b073b49875059d6426614facb0d7f0.zip
git-8957661378b073b49875059d6426614facb0d7f0.tar.gz
git-8957661378b073b49875059d6426614facb0d7f0.tar.bz2
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 'submodule-config.c')
-rw-r--r--submodule-config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/submodule-config.c b/submodule-config.c
index 9345390..0fcdb39 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -213,7 +213,7 @@ static struct submodule *lookup_or_create_by_name(struct submodule_cache *cache,
static int parse_fetch_recurse(const char *opt, const char *arg,
int die_on_error)
{
- switch (git_config_maybe_bool(opt, arg)) {
+ switch (git_parse_maybe_bool(arg)) {
case 1:
return RECURSE_SUBMODULES_ON;
case 0:
@@ -237,7 +237,7 @@ int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg)
static int parse_push_recurse(const char *opt, const char *arg,
int die_on_error)
{
- switch (git_config_maybe_bool(opt, arg)) {
+ switch (git_parse_maybe_bool(arg)) {
case 1:
/* There's no simple "on" value when pushing */
if (die_on_error)