branch: publish die_if_checked_out()
authorEric Sunshine <sunshine@sunshineco.com>
Fri, 17 Jul 2015 23:00:04 +0000 (19:00 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jul 2015 18:29:24 +0000 (11:29 -0700)
commited89f84b3c05d6359aba842e245910c996d91859
tree3972049b8bae8865590f68c2a74d9df244e21193
parent746bbdc64f1e1b2618cd71e5da81e38aa772e8ba
branch: publish die_if_checked_out()

git-worktree currently conflates new branch creation, setting of HEAD in
the new wortkree, and worktree population into a single sub-invocation
of git-checkout. However, these operations will eventually be separated,
and git-worktree itself will need to be able to detect if the branch is
already checked out elsewhere, rather than relying upon git-branch to
make this determination, so publish die_if_checked_out().

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
branch.c
branch.h
builtin/checkout.c