summaryrefslogtreecommitdiff
path: root/Documentation/asciidoc.conf
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-02-15 20:35:33 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-02-15 15:54:13 -0800
commitbeb6f24beef67f6f825c8c99e408f67d23b784d4 (patch)
tree943606669576499fc5e0fd4a3f1c05b7bc50c75f /Documentation/asciidoc.conf
parentworktree: fix "add -B" (diff)
downloadtgif-beb6f24beef67f6f825c8c99e408f67d23b784d4.tar.xz
worktree add -B: do the checkout test before update branch
If --force is not given but -B is, we should not proceed if the given branch is already checked out elsewhere. add_worktree() has this test, but it kicks in too late when "git branch --force" is already executed. As a result, even though we correctly refuse to create a new worktree, we have already updated the branch and mess up the other checkout. Repeat the die_if_checked_out() test again for this specific case before "git branch" runs. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/asciidoc.conf')
0 files changed, 0 insertions, 0 deletions