diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-03-10 11:13:45 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-10 11:13:45 -0800 |
commit | 0e58b47d153a90d80518ef35c53ffb244ed4ecd6 (patch) | |
tree | f2bff1f66597e84bdd91a0ecd50b094d06cd387d /t | |
parent | 1191d606bb2b544e3d8429d07f8ff43aae7d8145 (diff) | |
parent | 638fa623d5b5fb392a062edf61ccf086d35ab26b (diff) | |
download | git-0e58b47d153a90d80518ef35c53ffb244ed4ecd6.tar.gz git-0e58b47d153a90d80518ef35c53ffb244ed4ecd6.tar.xz |
Merge branch 'js/config-set-in-non-repository' into maint
"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')
-rwxr-xr-x | t/t1308-config-set.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh index 91235b76b..9863d0d0e 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 |