checkout: avoid resolving HEAD unnecessarily
commitc265c533cfbced87d56ad6d3d4ae3d62475c29ce
authorEric Sunshine <sunshine@sunshineco.com>
Fri, 17 Jul 2015 22:59:56 +0000 (17 18:59 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jul 2015 18:29:24 +0000 (20 11:29 -0700)
treebaa9700fd11a99d11c204bc66d56cb86373f2e92
parent114ff8881ac3de4b97f62f014560c99bed5dab92
checkout: avoid resolving HEAD unnecessarily

When --ignore-other-worktree is specified, we unconditionally skip the
check to see if the requested branch is already checked out in a linked
worktree. Since we know that we will be skipping that check, there is no
need to resolve HEAD in order to detect other conditions under which we
may skip the check.

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