X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgit.git;a=blobdiff_plain;f=t%2Ft1300-config.sh;fp=t%2Ft1300-config.sh;h=825d9a184fbbf4c14a7b6b5d98125947d3336666;hp=97ebfe1f9d5cea7b37d70d8f7069f00bb5045b8e;hb=80cacaec41b0fde4900ffef5f4374a9365db0755;hpb=52bcf6e181eabe55266e6c8e85cfaf336a013f3d diff --git a/t/t1300-config.sh b/t/t1300-config.sh index 97ebfe1f9d..825d9a184f 100755 --- a/t/t1300-config.sh +++ b/t/t1300-config.sh @@ -1836,11 +1836,14 @@ test_expect_success '--show-scope with --show-origin' ' test_cmp expect output ' -test_expect_success '--local requires a repo' ' - # we expect 128 to ensure that we do not simply - # fail to find anything and return code "1" - test_expect_code 128 nongit git config --local foo.bar -' +for opt in --local --worktree +do + test_expect_success "$opt requires a repo" ' + # we expect 128 to ensure that we do not simply + # fail to find anything and return code "1" + test_expect_code 128 nongit git config $opt foo.bar + ' +done cat >.git/config <<-\EOF && [core]