Add "const" qualifier to "char *pager_program".
[gitweb.git] / config.c
index 7b8615d87d654dc39128a95b37f4a7bbcb0975d5..eb6d2ad78b9235de1d8aa9e1a5b80ba7a3ba432c 100644 (file)
--- a/config.c
+++ b/config.c
@@ -440,12 +440,8 @@ 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)