submodule.c: report the submodule that an error occurs in
[gitweb.git] / t / t2025-worktree-add.sh
index 1285668cfce0bb0f9f7a62dcf3dd293d03be40b2..2b959449730e14dd4e650ce9115a463d71eedca4 100755 (executable)
@@ -245,6 +245,12 @@ test_expect_success 'local clone from linked checkout' '
        ( cd here-clone && git fsck )
 '
 
+test_expect_success 'local clone --shared from linked checkout' '
+       git -C bare worktree add --detach ../baretree &&
+       git clone --local --shared baretree bare-clone &&
+       grep /bare/ bare-clone/.git/objects/info/alternates
+'
+
 test_expect_success '"add" worktree with --no-checkout' '
        git worktree add --no-checkout -b swamp swamp &&
        ! test -e swamp/init.t &&