checkout: generalize die_if_checked_out() branch name argument
commit4341460d92c2857193954158f35aaf7518aa7a58
authorEric Sunshine <sunshine@sunshineco.com>
Fri, 17 Jul 2015 23:00:00 +0000 (17 19:00 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jul 2015 18:29:24 +0000 (20 11:29 -0700)
tree6487a7e9e03b3cbf0dceb81fb466e466ac83ad34
parent4e07815dba5ccad0cfcb672b99e2000bd3dc3543
checkout: generalize die_if_checked_out() branch name argument

The plan is to publish die_if_checked_out() so that callers other than
git-checkout can take advantage of it, however, those callers won't have
access to git-checkout's "struct branch_info". Therefore, change it to
accept the full name of the branch as a simple string instead.

While here, also give the argument a more meaningful name ("branch"
instead of "new").

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