summaryrefslogtreecommitdiff
path: root/builtin/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-30 12:51:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-30 12:51:27 (GMT)
commitb2fd6592943db80ef9bfccbf55d65a39268d76ed (patch)
tree35b12601a1261a3654076ae4f70debd0c3c19bf6 /builtin/config.c
parent0821b73063a6d4cfd2f61619b7afe01ce9c6d99e (diff)
parent17b8a2d6cdfc359b1a7de6dd215dc3c32ab1dbfe (diff)
downloadgit-b2fd6592943db80ef9bfccbf55d65a39268d76ed.zip
git-b2fd6592943db80ef9bfccbf55d65a39268d76ed.tar.gz
git-b2fd6592943db80ef9bfccbf55d65a39268d76ed.tar.bz2
Merge branch 'jk/config-blob-sans-repo'
Error codepath fix. * jk/config-blob-sans-repo: config: die when --blob is used outside a repository
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 1e31aa9..b29d26d 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -602,6 +602,9 @@ int cmd_config(int argc, const char **argv, const char *prefix)
if (use_local_config && nongit)
die(_("--local can only be used inside a git repository"));
+ if (given_config_source.blob && nongit)
+ die(_("--blob can only be used inside a git repository"));
+
if (given_config_source.file &&
!strcmp(given_config_source.file, "-")) {
given_config_source.file = NULL;