Merge branch 'ah/log-decorate-default-to-auto'
[gitweb.git] / builtin / config.c
index 1b7ed5af0839d25e063e19c9a83b4233a7c2a3ca..3a554ad50ca60cd327ce94433022f8d42f024f52 100644 (file)
@@ -600,8 +600,9 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                if (given_config_source.blob)
                        die("editing blobs is not supported");
                git_config(git_default_config, NULL);
-               config_file = xstrdup(given_config_source.file ?
-                                     given_config_source.file : git_path("config"));
+               config_file = given_config_source.file ?
+                               xstrdup(given_config_source.file) :
+                               git_pathdup("config");
                if (use_global_config) {
                        int fd = open(config_file, O_CREAT | O_EXCL | O_WRONLY, 0666);
                        if (fd >= 0) {