Re: [PATCH 10/16] worktree: make branch creation distinct from worktree population

2015-07-12 Thread Eric Sunshine
On Sun, Jul 12, 2015 at 04:54:02PM +0700, Duy Nguyen wrote: > On Sun, Jul 12, 2015 at 10:27 AM, Eric Sunshine > wrot> > In this case, it's easy enough to side-step the issue since there's no > > need to call ref_exists() if the new branch was created successfully > > (since we know it exists). Th

Re: [PATCH 10/16] worktree: make branch creation distinct from worktree population

2015-07-12 Thread Duy Nguyen
(resend, +everybody) On Sun, Jul 12, 2015 at 10:27 AM, Eric Sunshine wrote: >>> So, if I understand your concern correctly, then you are worried that, >>> following the git-branch invocation, ref_exists() could return the >>> wrong answer with a pluggable ref-backend since it might be answering >

Re: [PATCH 10/16] worktree: make branch creation distinct from worktree population

2015-07-11 Thread Eric Sunshine
On Sat, Jul 11, 2015 at 11:14 PM, Eric Sunshine wrote: > On Sat, Jul 11, 2015 at 11:10 PM, Eric Sunshine > wrote: >> On Sat, Jul 11, 2015 at 10:48 PM, Duy Nguyen wrote: >>> The "shouldn't affect" is potentially a problem.If the current >>> 'worktree add' process caches something (in ref handlin

Re: [PATCH 10/16] worktree: make branch creation distinct from worktree population

2015-07-11 Thread Eric Sunshine
On Sat, Jul 11, 2015 at 11:10 PM, Eric Sunshine wrote: > On Sat, Jul 11, 2015 at 10:48 PM, Duy Nguyen wrote: >> The "shouldn't affect" is potentially a problem.If the current >> 'worktree add' process caches something (in ref handling, for example) >> that the 'git branch' process changes, then w

Re: [PATCH 10/16] worktree: make branch creation distinct from worktree population

2015-07-11 Thread Eric Sunshine
On Sat, Jul 11, 2015 at 10:48 PM, Duy Nguyen wrote: > On Sun, Jul 12, 2015 at 9:36 AM, Eric Sunshine > wrote: >> On Sat, Jul 11, 2015 at 9:20 PM, Duy Nguyen wrote: >>> On Sat, Jul 11, 2015 at 7:05 AM, Eric Sunshine >>> wrote: The plan is eventually to populate the new worktree via "git r

Re: [PATCH 10/16] worktree: make branch creation distinct from worktree population

2015-07-11 Thread Duy Nguyen
On Sun, Jul 12, 2015 at 9:36 AM, Eric Sunshine wrote: > On Sat, Jul 11, 2015 at 9:20 PM, Duy Nguyen wrote: >> On Sat, Jul 11, 2015 at 7:05 AM, Eric Sunshine >> wrote: >>> The plan is eventually to populate the new worktree via "git reset >>> --hard" rather than "git checkout". Thus, rather than

Re: [PATCH 10/16] worktree: make branch creation distinct from worktree population

2015-07-11 Thread Eric Sunshine
On Sat, Jul 11, 2015 at 9:20 PM, Duy Nguyen wrote: > On Sat, Jul 11, 2015 at 7:05 AM, Eric Sunshine > wrote: >> The plan is eventually to populate the new worktree via "git reset >> --hard" rather than "git checkout". Thus, rather than piggybacking on >> git-checkout's -b/-B ability to create a

Re: [PATCH 10/16] worktree: make branch creation distinct from worktree population

2015-07-11 Thread Duy Nguyen
On Sat, Jul 11, 2015 at 7:05 AM, Eric Sunshine wrote: > The plan is eventually to populate the new worktree via "git reset > --hard" rather than "git checkout". Thus, rather than piggybacking on > git-checkout's -b/-B ability to create a new branch at checkout time, > git-worktree will need to do

[PATCH 10/16] worktree: make branch creation distinct from worktree population

2015-07-11 Thread Eric Sunshine
The plan is eventually to populate the new worktree via "git reset --hard" rather than "git checkout". Thus, rather than piggybacking on git-checkout's -b/-B ability to create a new branch at checkout time, git-worktree will need to do so itself. Signed-off-by: Eric Sunshine --- I considered cal