checkout: reject if the branch is already checked out elsewhere
commit5883034c61c60e04db16520a759ec67a34ffaea3
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 30 Nov 2014 08:24:49 +0000 (30 15:24 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Dec 2014 19:00:17 +0000 (1 11:00 -0800)
tree21ab4cc9c42663e5ae792a4ae07f53954550cbcf
parent23af91d102e1efaff33b77ab7746356835a3d600
checkout: reject if the branch is already checked out elsewhere

One branch obviously can't be checked out at two places (but detached
heads are ok). Give the user a choice in this case: --detach, -b
new-branch, switch branch in the other checkout first or simply 'cd'
and continue to work there.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/checkout.c
t/t2025-checkout-to.sh