summaryrefslogtreecommitdiff
path: root/t/t4041-diff-submodule-option.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4041-diff-submodule-option.sh')
-rwxr-xr-xt/t4041-diff-submodule-option.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh
index e432896..2d9731b 100755
--- a/t/t4041-diff-submodule-option.sh
+++ b/t/t4041-diff-submodule-option.sh
@@ -528,10 +528,12 @@ test_expect_success 'diff --submodule with objects referenced by alternates' '
sha1_before=$(git rev-parse --short HEAD)
echo b >b &&
git add b &&
- git commit -m b
- sha1_after=$(git rev-parse --short HEAD)
- echo "Submodule sub $sha1_before..$sha1_after:
- > b" >../expected
+ git commit -m b &&
+ sha1_after=$(git rev-parse --short HEAD) &&
+ {
+ echo "Submodule sub $sha1_before..$sha1_after:" &&
+ echo " > b"
+ } >../expected
) &&
(cd super &&
(cd sub &&
@@ -539,7 +541,7 @@ test_expect_success 'diff --submodule with objects referenced by alternates' '
git checkout origin/master
) &&
git diff --submodule > ../actual
- )
+ ) &&
test_cmp expected actual
'