Sync with 2.8.2
[gitweb.git] / t / t2025-worktree-add.sh
index cbfa41ec61b9f893b4df441e0289a5313ccaf413..3acb9926f2ff7fbf2b367a089b294a4a88e2ea31 100755 (executable)
@@ -213,4 +213,16 @@ test_expect_success 'local clone from linked checkout' '
        ( cd here-clone && git fsck )
 '
 
+test_expect_success '"add" worktree with --no-checkout' '
+       git worktree add --no-checkout -b swamp swamp &&
+       ! test -e swamp/init.t &&
+       git -C swamp reset --hard &&
+       test_cmp init.t swamp/init.t
+'
+
+test_expect_success '"add" worktree with --checkout' '
+       git worktree add --checkout -b swmap2 swamp2 &&
+       test_cmp init.t swamp2/init.t
+'
+
 test_done