Code

Merge branch 'cb/maint-orphan-merge-noclobber'
[git.git] / config.c
index 4b0a82040e7982ab936ed52b2bb3405bc85b80f8..c63d6834e087bbe2469cb285d3b3de475b76b972 100644 (file)
--- a/config.c
+++ b/config.c
@@ -871,9 +871,7 @@ int git_config(config_fn_t fn, void *data)
        if (config_parameters)
                found += 1;
 
-       if (found == 0)
-               return -1;
-       return ret;
+       return ret == 0 ? found : ret;
 }
 
 /*