checkout: support checking out into a new working directory
commit529fef20cf94dbd5c16f7a239ffc2b06f3cf8bb7
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 30 Nov 2014 08:24:47 +0000 (30 15:24 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Dec 2014 19:00:16 +0000 (1 11:00 -0800)
tree732a63391953b43db6a149b585822e2bcd57f9f6
parent91aacda85a91192a9f66a0f175d739f77971412f
checkout: support checking out into a new working directory

"git checkout --to" sets up a new working directory with a .git file
pointing to $GIT_DIR/worktrees/<id>. It then executes "git checkout"
again on the new worktree with the same arguments except "--to" is
taken out. The second checkout execution, which is not contaminated
with any info from the current repository, will actually check out and
everything that normal "git checkout" does.

Helped-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-checkout.txt
Documentation/git.txt
Documentation/gitrepository-layout.txt
builtin/checkout.c
path.c
t/t2025-checkout-to.sh [new file with mode: 0755]