worktree: allow the main brach of a bare repository to be checked out
authorDennis Kaarsemaker <redacted>
Wed, 12 Oct 2016 16:41:07 +0000 (18:41 +0200)
committerJunio C Hamano <redacted>
Fri, 14 Oct 2016 16:58:58 +0000 (09:58 -0700)
commit171c646f8c6484cca76933ebe8a6af52df47277d
treedd23cd499840e8d6078295712da32a97e3344562
parent74eeaf7b72a94bd3e0ff275edb90e6ee2423b529
worktree: allow the main brach of a bare repository to be checked out

In bare repositories, get_worktrees() still returns the main repository,
so git worktree list can show it. ignore it in find_shared_symref so we
can still check out the main branch.

Signed-off-by: Dennis Kaarsemaker <redacted>
Acked-by: Nguyễn Thái Ngọc Duy <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t2025-worktree-add.sh
worktree.c
git clone https://git.99rst.org/PROJECT