Code

config: Add new option to open an editor.
[git.git] / config.c
index d2fc8f5f22782f7409915f9261a8c851d9d89a8e..e5d5b4bd0689d8c2932d501779356fc33a0d0379 100644 (file)
--- a/config.c
+++ b/config.c
@@ -469,6 +469,11 @@ static int git_default_core_config(const char *var, const char *value)
                return 0;
        }
 
+       if (!strcmp(var, "core.notesref")) {
+               notes_ref_name = xstrdup(value);
+               return 0;
+       }
+
        if (!strcmp(var, "core.pager"))
                return git_config_string(&pager_program, var, value);
 
@@ -636,10 +641,7 @@ int git_config(config_fn_t fn, void *data)
        char *repo_config = NULL;
        const char *home = NULL;
 
-       /* $GIT_CONFIG makes git read _only_ the given config file,
-        * $GIT_CONFIG_LOCAL will make it process it in addition to the
-        * global config file, the same way it would the per-repository
-        * config file otherwise. */
+       /* Setting $GIT_CONFIG makes git read _only_ the given config file. */
        if (config_exclusive_filename)
                return git_config_from_file(fn, config_exclusive_filename, data);
        if (git_config_system() && !access(git_etc_gitconfig(), R_OK))