aboutsummaryrefslogtreecommitdiff
path: root/builtin/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-05-29 12:34:45 +0900
committerJunio C Hamano <gitster@pobox.com>2017-05-29 12:34:45 +0900
commit220c6a70803d520a7cd19f9f2889650d54574470 (patch)
tree511bbcf9b63f7152729a716d8dbd049d2376ed29 /builtin/config.c
parent15c96723457cfa1be6cdbd74e3131ecf13cd9790 (diff)
parent3d7dd2d3b6ccc8903a37cffe3a2f39cf1be21c86 (diff)
downloadgit-220c6a70803d520a7cd19f9f2889650d54574470.tar.gz
git-220c6a70803d520a7cd19f9f2889650d54574470.tar.xz
Merge branch 'jk/bug-to-abort'
Introduce the BUG() macro to improve die("BUG: ..."). * jk/bug-to-abort: usage: add NORETURN to BUG() function definitions config: complain about --local outside of a git repo setup_git_env: convert die("BUG") to BUG() usage.c: add BUG() function
Diffstat (limited to 'builtin/config.c')
-rw-r--r--builtin/config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/config.c b/builtin/config.c
index 3a554ad50..7f6c25d4d 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -496,6 +496,9 @@ int cmd_config(int argc, const char **argv, const char *prefix)
usage_with_options(builtin_config_usage, builtin_config_options);
}
+ if (use_local_config && nongit)
+ die(_("--local can only be used inside a git repository"));
+
if (given_config_source.file &&
!strcmp(given_config_source.file, "-")) {
given_config_source.file = NULL;