@@ -115,6 +115,9 @@ test_expect_success 'git diff HEAD with dirty submodule (work tree, refs match)'
115
115
'
116
116
117
117
test_expect_success ' git diff HEAD with dirty submodule (work tree, refs match) [.git/config]' '
118
+ git config diff.ignoreSubmodules all &&
119
+ git diff HEAD >actual &&
120
+ ! test -s actual &&
118
121
git config submodule.subname.ignore none &&
119
122
git config submodule.subname.path sub &&
120
123
git diff HEAD >actual &&
@@ -136,10 +139,14 @@ test_expect_success 'git diff HEAD with dirty submodule (work tree, refs match)
136
139
sed -e "1,/^@@/d" actual >actual.body &&
137
140
expect_from_to >expect.body $subprev $subprev-dirty &&
138
141
test_cmp expect.body actual.body &&
139
- git config --remove-section submodule.subname
142
+ git config --remove-section submodule.subname &&
143
+ git config --unset diff.ignoreSubmodules
140
144
'
141
145
142
146
test_expect_success ' git diff HEAD with dirty submodule (work tree, refs match) [.gitmodules]' '
147
+ git config diff.ignoreSubmodules dirty &&
148
+ git diff HEAD >actual &&
149
+ ! test -s actual &&
143
150
git config --add -f .gitmodules submodule.subname.ignore none &&
144
151
git config --add -f .gitmodules submodule.subname.path sub &&
145
152
git diff HEAD >actual &&
@@ -166,6 +173,7 @@ test_expect_success 'git diff HEAD with dirty submodule (work tree, refs match)
166
173
test_cmp expect.body actual.body &&
167
174
git config --remove-section submodule.subname &&
168
175
git config --remove-section -f .gitmodules submodule.subname &&
176
+ git config --unset diff.ignoreSubmodules &&
169
177
rm .gitmodules
170
178
'
171
179
0 commit comments