worktree: add: make -b/-B default to HEAD when <branch> is omitted
commit0f4af3b9ea1fc62e445271bb2e7fbb8e1ac230b7
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 6 Jul 2015 17:30:58 +0000 (6 13:30 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jul 2015 18:07:48 +0000 (6 11:07 -0700)
tree0980a1eeee8eababf711fc6b2e1dc0133bc0adac
parentf5682b2a861cbde6e9aca324caa5e2d36c49569a
worktree: add: make -b/-B default to HEAD when <branch> is omitted

As a convenience, like "git branch" and "git checkout -b", make
"git worktree add -b <newbranch> <path> <branch>" default to HEAD when
<branch> is omitted.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-worktree.txt
builtin/worktree.c
t/t2025-worktree-add.sh