summaryrefslogtreecommitdiff
path: root/t/t0068-for-each-repo.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2023-03-28 14:04:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-03-28 14:37:53 (GMT)
commitf7b2ff95163247a3ec437f0ce78bb27cdac68b75 (patch)
tree6a7f5cd3ae07725b08ca6a56ee86f5a7ae226d84 /t/t0068-for-each-repo.sh
parenta428619309f42b76b5f750e66a5c1fd2225db3b3 (diff)
downloadgit-f7b2ff95163247a3ec437f0ce78bb27cdac68b75.zip
git-f7b2ff95163247a3ec437f0ce78bb27cdac68b75.tar.gz
git-f7b2ff95163247a3ec437f0ce78bb27cdac68b75.tar.bz2
for-each-repo: error on bad --config
As noted in 6c62f015520 (for-each-repo: do nothing on empty config, 2021-01-08) this command wants to ignore a non-existing config key, but let's not conflate that with bad config. Before this, all these added tests would pass with an exit code of 0. We could preserve the comment added in 6c62f015520, but now that we're directly using the documented repo_config_get_value_multi() value it's just narrating something that should be obvious from the API use, so let's drop it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0068-for-each-repo.sh')
-rwxr-xr-xt/t0068-for-each-repo.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t0068-for-each-repo.sh b/t/t0068-for-each-repo.sh
index c6e0d65..19ceaa5 100755
--- a/t/t0068-for-each-repo.sh
+++ b/t/t0068-for-each-repo.sh
@@ -39,4 +39,10 @@ test_expect_success 'do nothing on empty config' '
git for-each-repo --config=bogus.config -- help --no-such-option
'
+test_expect_success 'error on bad config keys' '
+ test_expect_code 129 git for-each-repo --config=a &&
+ test_expect_code 129 git for-each-repo --config=a.b. &&
+ test_expect_code 129 git for-each-repo --config="'\''.b"
+'
+
test_done