checkout: Add test for diff.ignoreSubmodules
[gitweb.git] / t / t2013-checkout-submodule.sh
index fda3f0af7eb0fcaf7d0d61ff10a22e2dedaa416b..3beb0b3ed7bb62ce004979ffc8910ef3b992a0a3 100755 (executable)
@@ -39,4 +39,11 @@ test_expect_success '"checkout <submodule>" updates the index only' '
        git diff-files --quiet
 '
 
+test_expect_success '"checkout <submodule>" honors diff.ignoreSubmodules' '
+       git config diff.ignoreSubmodules dirty &&
+       echo x> submodule/untracked &&
+       git checkout HEAD >actual 2>&1 &&
+       ! test -s actual
+'
+
 test_done