diff options
Diffstat (limited to 'builtin-config.c')
-rw-r--r-- | builtin-config.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-config.c b/builtin-config.c index d8da72cf2..a81bc8bbf 100644 --- a/builtin-config.c +++ b/builtin-config.c @@ -390,6 +390,8 @@ int cmd_config(int argc, const char **argv, const char *unused_prefix) } else if (actions == ACTION_EDIT) { check_argc(argc, 0, 0); + if (!config_exclusive_filename && nongit) + die("not in a git directory"); git_config(git_default_config, NULL); launch_editor(config_exclusive_filename ? config_exclusive_filename : git_path("config"), |