X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft2013-checkout-submodule.sh;h=70edbb33e26c0ee6d5cec81d2417c8a830d6fab1;hb=b3f01ff29f7131e959bcfdfd004744d74d5fa319;hp=fda3f0af7eb0fcaf7d0d61ff10a22e2dedaa416b;hpb=bb35fefbc952d5661d8b675aa5e0c1c49c515487;p=git.git diff --git a/t/t2013-checkout-submodule.sh b/t/t2013-checkout-submodule.sh index fda3f0af7..70edbb33e 100755 --- a/t/t2013-checkout-submodule.sh +++ b/t/t2013-checkout-submodule.sh @@ -39,4 +39,27 @@ test_expect_success '"checkout " updates the index only' ' git diff-files --quiet ' +test_expect_success '"checkout " honors diff.ignoreSubmodules' ' + git config diff.ignoreSubmodules dirty && + echo x> submodule/untracked && + git checkout HEAD >actual 2>&1 && + ! test -s actual +' + +test_expect_success '"checkout " honors submodule.*.ignore from .gitmodules' ' + git config diff.ignoreSubmodules none && + git config -f .gitmodules submodule.submodule.path submodule && + git config -f .gitmodules submodule.submodule.ignore untracked && + git checkout HEAD >actual 2>&1 && + ! test -s actual +' + +test_expect_success '"checkout " honors submodule.*.ignore from .git/config' ' + git config -f .gitmodules submodule.submodule.ignore none && + git config submodule.submodule.path submodule && + git config submodule.submodule.ignore all && + git checkout HEAD >actual 2>&1 && + ! test -s actual +' + test_done