summaryrefslogtreecommitdiff
path: root/t/t1308-config-set.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-02-26 13:37:26 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-02-26 13:37:26 -0800
commitd3faba840e758e6b5340b59a69e919fec77ce1c3 (patch)
treef1df2fc257a55cc1d2f31f8c99a7f93904fcd0e0 /t/t1308-config-set.sh
parentMerge branch 'jk/epipe-in-async' (diff)
parentgit config: report when trying to modify a non-existing repo config (diff)
downloadtgif-d3faba840e758e6b5340b59a69e919fec77ce1c3.tar.xz
Merge branch 'js/config-set-in-non-repository'
"git config section.var value" to set a value in per-repository configuration file failed when it was run outside any repository, but didn't say the reason correctly. * js/config-set-in-non-repository: git config: report when trying to modify a non-existing repo config
Diffstat (limited to 't/t1308-config-set.sh')
-rwxr-xr-xt/t1308-config-set.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh
index 82f82a16d9..005d66dbef 100755
--- a/t/t1308-config-set.sh
+++ b/t/t1308-config-set.sh
@@ -218,4 +218,15 @@ test_expect_success 'check line errors for malformed values' '
test_i18ngrep "fatal: .*alias\.br.*\.git/config.*line 2" result
'
+test_expect_success 'error on modifying repo config without repo' '
+ mkdir no-repo &&
+ (
+ GIT_CEILING_DIRECTORIES=$(pwd) &&
+ export GIT_CEILING_DIRECTORIES &&
+ cd no-repo &&
+ test_must_fail git config a.b c 2>err &&
+ grep "not in a git directory" err
+ )
+'
+
test_done