checkout: teach check_linked_checkout() about symbolic link HEAD
commit746bbdc64f1e1b2618cd71e5da81e38aa772e8ba
authorEric Sunshine <sunshine@sunshineco.com>
Fri, 17 Jul 2015 23:00:03 +0000 (17 19:00 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jul 2015 18:29:24 +0000 (20 11:29 -0700)
tree0dcdbcb719ba305fdaaca9aa6a844380a2370def
parent33aef83666900df03c39bcf7e391e2f8195dd13c
checkout: teach check_linked_checkout() about symbolic link HEAD

check_linked_checkout() only understands symref-style HEAD (i.e. "ref:
refs/heads/master"), however, HEAD may also be a an actual symbolic link
(on platforms which support it). To accurately detect if a branch is
checked out elsewhere, it needs to handle symbolic link HEAD, as well.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/checkout.c
t/t2025-worktree-add.sh