Re: [PATCH v3] checkout: optimize "git checkout -b "

2018-09-04 Thread Duy Nguyen
On Thu, Aug 30, 2018 at 7:22 PM Elijah Newren wrote: > > Hi Duy, > > On Tue, Aug 21, 2018 at 7:52 AM Duy Nguyen wrote: > > > > On Mon, Aug 20, 2018 at 8:16 PM Elijah Newren wrote: > > > Playing with sparse-checkout, it feels to me like a half-baked > > > feature. It seems like it required too m

Re: [PATCH v3] checkout: optimize "git checkout -b "

2018-08-30 Thread Elijah Newren
Hi Duy, On Tue, Aug 21, 2018 at 7:52 AM Duy Nguyen wrote: > > On Mon, Aug 20, 2018 at 8:16 PM Elijah Newren wrote: > > Playing with sparse-checkout, it feels to me like a half-baked > > feature. It seems like it required too much manual work, and it was > > sometimes hard to tell if I was misun

Re: [PATCH v3] checkout: optimize "git checkout -b "

2018-08-21 Thread Duy Nguyen
On Mon, Aug 20, 2018 at 8:16 PM Elijah Newren wrote: > Playing with sparse-checkout, it feels to me like a half-baked > feature. It seems like it required too much manual work, and it was > sometimes hard to tell if I was misunderstanding configuration rules > or I was just running into bugs in t

Re: [PATCH v3] checkout: optimize "git checkout -b "

2018-08-20 Thread Junio C Hamano
Elijah Newren writes: > == The patch == > - Ben's patch only affects the "checkout -b $NEWBRANCH" case. He > checks for it by looking for any other flag that would be a different > case, and using the old codepath if he finds any. > - This means there is a "giant list of checks" for this optimiz

Re: [PATCH v3] checkout: optimize "git checkout -b "

2018-08-20 Thread Elijah Newren
On Mon, Aug 20, 2018 at 6:40 AM Ben Peart wrote: > On 8/18/2018 9:44 PM, Elijah Newren wrote: ... > > == My opinions == > > - The performance wins are big enough that I can see why Ben is pushing > > this. > > - I totally see Duy's point that more general optimizations would be > > really nice. >

Re: [PATCH v3] checkout: optimize "git checkout -b "

2018-08-20 Thread Ben Peart
On 8/18/2018 9:44 PM, Elijah Newren wrote: On Fri, Aug 17, 2018 at 5:41 AM Ben Peart wrote: On 8/16/2018 2:37 PM, Duy Nguyen wrote: On Thu, Aug 16, 2018 at 8:27 PM Ben Peart wrote: From: Ben Peart Skip merging the commit, updating the index and working directory if and only if we are c

Re: [PATCH v3] checkout: optimize "git checkout -b "

2018-08-18 Thread Elijah Newren
On Fri, Aug 17, 2018 at 5:41 AM Ben Peart wrote: > On 8/16/2018 2:37 PM, Duy Nguyen wrote: > > On Thu, Aug 16, 2018 at 8:27 PM Ben Peart wrote: > >> > >> From: Ben Peart > >> > >> Skip merging the commit, updating the index and working directory if and > >> only if we are creating a new branch v

Re: [PATCH v3] checkout: optimize "git checkout -b "

2018-08-17 Thread Ben Peart
On 8/16/2018 2:37 PM, Duy Nguyen wrote: On Thu, Aug 16, 2018 at 8:27 PM Ben Peart wrote: From: Ben Peart Skip merging the commit, updating the index and working directory if and only if we are creating a new branch via "git checkout -b ." Any other checkout options will still go through t

Re: [PATCH v3] checkout: optimize "git checkout -b "

2018-08-16 Thread Duy Nguyen
On Thu, Aug 16, 2018 at 8:27 PM Ben Peart wrote: > > From: Ben Peart > > Skip merging the commit, updating the index and working directory if and > only if we are creating a new branch via "git checkout -b ." > Any other checkout options will still go through the former code path. > > If sparse_c

[PATCH v3] checkout: optimize "git checkout -b "

2018-08-16 Thread Ben Peart
From: Ben Peart Skip merging the commit, updating the index and working directory if and only if we are creating a new branch via "git checkout -b ." Any other checkout options will still go through the former code path. If sparse_checkout is on, require the user to manually opt in to this optim