checkout: Add test for diff.ignoreSubmodules
While at it, document that checkout uses this flag too in the Documentation. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jens Lehmann committed
Aug 28, 2010 at 16:49 UTC
62ed0096423b098f9736f5397edad8aa7bf50210
2 files changed
+9
-1
Documentation/config.txt
+2
-1
@@ -829,7 +829,8 @@ diff.renames::
829
diff.ignoreSubmodules::
830
Sets the default value of --ignore-submodules. Note that this
831
affects only 'git diff' Porcelain, and not lower level 'diff'
832
- commands such as 'git diff-files'.
832
+ commands such as 'git diff-files'. 'git checkout' also honors
833
+ this setting when reporting uncommitted changes.
834
835
diff.suppressBlankEmpty::
836
A boolean to inhibit the standard behavior of printing a space
t/t2013-checkout-submodule.sh
+7
@@ -39,4 +39,11 @@ test_expect_success '"checkout <submodule>" updates the index only' '
39
git diff-files --quiet
40
'
41
42
+test_expect_success '"checkout <submodule>" honors diff.ignoreSubmodules' '
43
+ git config diff.ignoreSubmodules dirty &&
44
+ echo x> submodule/untracked &&
45
+ git checkout HEAD >actual 2>&1 &&
46
+ ! test -s actual
47
+'
48
+
49
test_done