diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-13 14:12:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-13 14:12:30 -0700 |
commit | 0d8683c552c921fcf4cbd3f935d99496d153c811 (patch) | |
tree | 2278e3f6627f96d5221199d3cb130d0d4039ac52 /t | |
parent | 5c788e7746a2b60e13a0e9235bb68a19a35c12ee (diff) | |
parent | ef2a0ac9a00c5d82f1fbbef8304c662ff60e4235 (diff) | |
download | git-0d8683c552c921fcf4cbd3f935d99496d153c811.tar.gz |
Merge branch 'rz/worktree-no-checkout'
"git worktree add" can be given "--no-checkout" option to only
create an empty worktree without checking out the files.
* rz/worktree-no-checkout:
worktree: add: introduce --checkout option
Diffstat (limited to 't')
-rwxr-xr-x | t/t2025-worktree-add.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t2025-worktree-add.sh b/t/t2025-worktree-add.sh index cbfa41ec61..3acb9926f2 100755 --- a/t/t2025-worktree-add.sh +++ b/t/t2025-worktree-add.sh @@ -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 |