summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-11-03 15:32:34 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-11-03 15:32:35 -0800
commit1bf986bc9c1e823da27465bfd9faf2b725bbcc09 (patch)
treeb47aa7c235ebf2bf958f7906e58a0750a418f0db /t
parentMerge branch 'nd/gc-auto-background-fix' into maint (diff)
parentpath: implement common_dir handling in git_pathdup_submodule() (diff)
downloadtgif-1bf986bc9c1e823da27465bfd9faf2b725bbcc09.tar.xz
Merge branch 'mk/submodule-gitdir-path' into maint
The submodule code has been taught to work better with separate work trees created via "git worktree add". * mk/submodule-gitdir-path: path: implement common_dir handling in git_pathdup_submodule() submodule refactor: use strbuf_git_path_submodule() in add_submodule_odb()
Diffstat (limited to 't')
-rwxr-xr-xt/t7410-submodule-checkout-to.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t7410-submodule-checkout-to.sh b/t/t7410-submodule-checkout-to.sh
index 3f609e8909..1acef32647 100755
--- a/t/t7410-submodule-checkout-to.sh
+++ b/t/t7410-submodule-checkout-to.sh
@@ -47,4 +47,14 @@ test_expect_success 'checkout main and initialize independed clones' \
test_expect_success 'can see submodule diffs after independed cloning' \
'(cd fully_cloned_submodule/main && git diff --submodule master"^!" | grep "file1 updated")'
+test_expect_success 'checkout sub manually' \
+ 'mkdir linked_submodule &&
+ (cd clone/main &&
+ git worktree add "$base_path/linked_submodule/main" "$rev1_hash_main") &&
+ (cd clone/main/sub &&
+ git worktree add "$base_path/linked_submodule/main/sub" "$rev1_hash_sub")'
+
+test_expect_success 'can see submodule diffs after manual checkout of linked submodule' \
+ '(cd linked_submodule/main && git diff --submodule master"^!" | grep "file1 updated")'
+
test_done