diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2023-03-28 16:04:25 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-03-28 16:37:53 +0200 |
commit | f7b2ff95163247a3ec437f0ce78bb27cdac68b75 (patch) | |
tree | 6a7f5cd3ae07725b08ca6a56ee86f5a7ae226d84 /t/t0068-for-each-repo.sh | |
parent | config API: have *_multi() return an "int" and take a "dest" (diff) | |
download | git-f7b2ff95163247a3ec437f0ce78bb27cdac68b75.tar.xz git-f7b2ff95163247a3ec437f0ce78bb27cdac68b75.zip |
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 '')
-rwxr-xr-x | t/t0068-for-each-repo.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t0068-for-each-repo.sh b/t/t0068-for-each-repo.sh index c6e0d65563..19ceaa546e 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 |