Documentation/git-request-pull: Fixed a typo ("send" -> "end")
[gitweb.git] / config.c
index 7b8615d87d654dc39128a95b37f4a7bbcb0975d5..b82907cb857c9f745a2afa7abe786ee0c7ae1ff8 100644 (file)
--- a/config.c
+++ b/config.c
@@ -440,26 +440,14 @@ int git_default_config(const char *var, const char *value)
                return 0;
        }
 
-       if (!strcmp(var, "core.pager")) {
-               if (!value)
-                       return config_error_nonbool(var);
-               pager_program = xstrdup(value);
-               return 0;
-       }
+       if (!strcmp(var, "core.pager"))
+               return git_config_string(&pager_program, var, value);
 
-       if (!strcmp(var, "core.editor")) {
-               if (!value)
-                       return config_error_nonbool(var);
-               editor_program = xstrdup(value);
-               return 0;
-       }
+       if (!strcmp(var, "core.editor"))
+               return git_config_string(&editor_program, var, value);
 
-       if (!strcmp(var, "core.excludesfile")) {
-               if (!value)
-                       return config_error_nonbool(var);
-               excludes_file = xstrdup(value);
-               return 0;
-       }
+       if (!strcmp(var, "core.excludesfile"))
+               return git_config_string(&excludes_file, var, value);
 
        if (!strcmp(var, "core.whitespace")) {
                if (!value)