]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t1300-config.sh
Merge branch 'mt/config-fail-nongit-early'
[thirdparty/git.git] / t / t1300-config.sh
index 97ebfe1f9d5cea7b37d70d8f7069f00bb5045b8e..825d9a184fbbf4c14a7b6b5d98125947d3336666 100755 (executable)
@@ -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]