summaryrefslogtreecommitdiff
path: root/t/t4041-diff-submodule.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4041-diff-submodule.sh')
-rwxr-xr-xt/t4041-diff-submodule.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t4041-diff-submodule.sh b/t/t4041-diff-submodule.sh
index 11b19972ca..019acb926d 100755
--- a/t/t4041-diff-submodule.sh
+++ b/t/t4041-diff-submodule.sh
@@ -329,4 +329,19 @@ index 0000000..$head7
EOF
"
+test_expect_success 'setup .git file for sm2' '
+ (cd sm2 &&
+ REAL="$(pwd)/../.real" &&
+ mv .git "$REAL"
+ echo "gitdir: $REAL" >.git)
+'
+
+test_expect_success 'diff --submodule with .git file' '
+ git diff --submodule HEAD^ >actual &&
+ diff actual - <<-EOF
+Submodule sm1 $head6...0000000 (submodule deleted)
+Submodule sm2 0000000...$head7 (new submodule)
+EOF
+'
+
test_done