summaryrefslogtreecommitdiff
path: root/t/t4027-diff-submodule.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4027-diff-submodule.sh')
-rwxr-xr-xt/t4027-diff-submodule.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/t/t4027-diff-submodule.sh b/t/t4027-diff-submodule.sh
index d7145ccca4..94ef77e1df 100755
--- a/t/t4027-diff-submodule.sh
+++ b/t/t4027-diff-submodule.sh
@@ -3,7 +3,7 @@
test_description='difference in submodules'
. ./test-lib.sh
-. "$TEST_DIRECTORY"/diff-lib.sh
+. "$TEST_DIRECTORY"/lib-diff.sh
test_expect_success setup '
test_tick &&
@@ -93,6 +93,14 @@ test_expect_success 'git diff HEAD with dirty submodule (untracked)' '
) &&
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
+ expect_from_to >expect.body $subtip $subprev &&
+ test_cmp expect.body actual.body
+'
+
+test_expect_success 'git diff HEAD with dirty submodule (untracked) (none ignored)' '
+ test_config diff.ignoreSubmodules none &&
+ git diff HEAD >actual &&
+ sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subtip $subprev-dirty &&
test_cmp expect.body actual.body
'
@@ -168,13 +176,13 @@ test_expect_success 'git diff HEAD with dirty submodule (untracked, refs match)'
git clean -qfdx &&
>cruft
) &&
- git diff HEAD >actual &&
+ git diff --ignore-submodules=none HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
test_cmp expect.body actual.body &&
git diff --ignore-submodules=all HEAD >actual2 &&
test_must_be_empty actual2 &&
- git diff --ignore-submodules=untracked HEAD >actual3 &&
+ git diff HEAD >actual3 &&
test_must_be_empty actual3 &&
git diff --ignore-submodules=dirty HEAD >actual4 &&
test_must_be_empty actual4