path: implement common_dir handling in git_pathdup_submodule()
[gitweb.git] / config.c
index 6c8d91a0f2a2dd98b4d62b31a584a8e68c273b9c..248a21ab94116fabba95e01a8571a458efa99f76 100644 (file)
--- a/config.c
+++ b/config.c
@@ -618,7 +618,7 @@ unsigned long git_config_ulong(const char *name, const char *value)
        return ret;
 }
 
-static int git_config_maybe_bool_text(const char *name, const char *value)
+int git_parse_maybe_bool(const char *value)
 {
        if (!value)
                return 1;
@@ -637,7 +637,7 @@ static int git_config_maybe_bool_text(const char *name, const char *value)
 
 int git_config_maybe_bool(const char *name, const char *value)
 {
-       int v = git_config_maybe_bool_text(name, value);
+       int v = git_parse_maybe_bool(value);
        if (0 <= v)
                return v;
        if (git_parse_int(value, &v))
@@ -647,7 +647,7 @@ int git_config_maybe_bool(const char *name, const char *value)
 
 int git_config_bool_or_int(const char *name, const char *value, int *is_bool)
 {
-       int v = git_config_maybe_bool_text(name, value);
+       int v = git_parse_maybe_bool(value);
        if (0 <= v) {
                *is_bool = 1;
                return v;