diff options
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/config.c b/src/config.c index 81f010fa2..42f46e6cf 100644 --- a/src/config.c +++ b/src/config.c @@ -1227,9 +1227,6 @@ int git_config_lookup_map_value( { size_t i; - if (!value) - goto fail_parse; - for (i = 0; i < map_n; ++i) { const git_configmap *m = maps + i; @@ -1238,7 +1235,7 @@ int git_config_lookup_map_value( case GIT_CONFIGMAP_TRUE: { int bool_val; - if (git__parse_bool(&bool_val, value) == 0 && + if (git_config_parse_bool(&bool_val, value) == 0 && bool_val == (int)m->type) { *out = m->map_value; return 0; @@ -1252,7 +1249,7 @@ int git_config_lookup_map_value( break; case GIT_CONFIGMAP_STRING: - if (strcasecmp(value, m->str_match) == 0) { + if (value && strcasecmp(value, m->str_match) == 0) { *out = m->map_value; return 0; } @@ -1260,7 +1257,6 @@ int git_config_lookup_map_value( } } -fail_parse: git_error_set(GIT_ERROR_CONFIG, "failed to map '%s'", value); return -1; } |