index 83c19147717f2a5e6c634918c74b93e54376d725..559b41eccde63e8bae10806a22df63a82bf127ce 100755 (executable)
@@ -103,9 +103,17 @@ test_expect_success 'git diff HEAD with dirty submodule (work tree, refs match)'
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
- test_cmp expect.body actual.body
+ test_cmp expect.body actual.body &&
+ git diff --ignore-submodules HEAD >actual2 &&
+ echo -n "" | test_cmp - actual2 &&
+ git diff --ignore-submodules=untracked HEAD >actual3 &&
+ sed -e "1,/^@@/d" actual3 >actual3.body &&
+ expect_from_to >expect.body $subprev $subprev-dirty &&
+ test_cmp expect.body actual3.body &&
+ git diff --ignore-submodules=dirty HEAD >actual4 &&
+ echo -n "" | test_cmp - actual4
'
-
+test_done
test_expect_success 'git diff HEAD with dirty submodule (index, refs match)' '
(
cd sub &&
@@ -129,7 +137,13 @@ test_expect_success 'git diff HEAD with dirty submodule (untracked, refs match)'
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
- test_cmp expect.body actual.body
+ test_cmp expect.body actual.body &&
+ git diff --ignore-submodules=all HEAD >actual2 &&
+ echo -n "" | test_cmp - actual2 &&
+ git diff --ignore-submodules=untracked HEAD >actual3 &&
+ echo -n "" | test_cmp - actual3 &&
+ git diff --ignore-submodules=dirty HEAD >actual4 &&
+ echo -n "" | test_cmp - actual4
'
test_expect_success 'git diff (empty submodule dir)' '