diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-05-29 12:34:45 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-29 12:34:45 +0900 |
commit | 220c6a70803d520a7cd19f9f2889650d54574470 (patch) | |
tree | 511bbcf9b63f7152729a716d8dbd049d2376ed29 /builtin/config.c | |
parent | 15c96723457cfa1be6cdbd74e3131ecf13cd9790 (diff) | |
parent | 3d7dd2d3b6ccc8903a37cffe3a2f39cf1be21c86 (diff) | |
download | git-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.c | 3 |
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; |