worktree: add: auto-vivify new branch when <branch> is omitted
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 6 Jul 2015 17:30:59 +0000 (13:30 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Jul 2015 21:34:32 +0000 (14:34 -0700)
As a convenience, when <branch> is omitted from "git worktree <path>
<branch>" and neither -b nor -B is used, automatically create a new
branch named after <path>, as if "-b $(basename <path>)" was specified.
Thus, "git worktree add ../hotfix" creates a new branch named "hotfix"
and associates it with new worktree "../hotfix".

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found