worktree: simplify new branch (-b/-B) option checking
commiteef005dcb3e039ccc3da65e9347cf4357bdeea6a
authorEric Sunshine <sunshine@sunshineco.com>
Fri, 17 Jul 2015 23:00:06 +0000 (17 19:00 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jul 2015 18:29:24 +0000 (20 11:29 -0700)
tree12e7d473ab012fd8ad357a6a8ea20eafb7f8028f
parentcd2f4713112119e18af8b5b580c5661a52320632
worktree: simplify new branch (-b/-B) option checking

Make 'new_branch' be the name of the new branch for both forced and
non-forced cases; and add boolean 'force_new_branch' to indicate forced
branch creation. This will simplify logic later on when git-worktree
handles branch creation locally rather than delegating it to
git-checkout as part of the worktree population phase.

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