checkout: relocate --to's "no branch specified" check
commit9559ce8368b533862584b2717532e3c25232f1c9
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 6 Jul 2015 17:30:46 +0000 (6 13:30 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jul 2015 18:07:44 +0000 (6 11:07 -0700)
tree2b3536bb3b757ed39bca08040e53f0b6bd381ebb
parentc990a4c11dd7bb671da1b30e14568ad986621488
checkout: relocate --to's "no branch specified" check

The plan is to relocate "git checkout --to" functionality to "git
worktree add", however, this check expects a 'struct branch_info' which
git-worktree won't have at hand. It will, however, have access to its
own command-line from which it can pick up the branch name. Therefore,
as a preparatory step, rather than having prepare_linked_checkout()
perform this check, make it the caller's responsibility.

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