worktree: make branch creation distinct from worktree population
commitc2842439a3ab9bcab122105f3f457afb37fbc7c1
authorEric Sunshine <sunshine@sunshineco.com>
Fri, 17 Jul 2015 23:00:10 +0000 (17 19:00 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Jul 2015 18:29:51 +0000 (20 11:29 -0700)
treefd9e02af4b22d4ead36c72253daf171578121759
parent5c942570fe2a48d8fde348e89392c2e9e23aa483
worktree: make branch creation distinct from worktree population

git-worktree currently conflates branch creation, setting of HEAD in the
new worktree, and worktree population into a single sub-invocation of
git-checkout, which requires git-checkout to be specially aware that it
is operating in a newly-created worktree. The goal is to free
git-checkout of that special knowledge, and to do so, git-worktree will
eventually perform those operations separately. Thus, as a first step,
rather than piggybacking on git-checkout's -b/-B ability to create a new
branch at checkout time, make git-worktree responsible for branch
creation itself.

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