RE: [PATCH v2] checkout: eliminate unnecessary merge for trivial checkout

2016-09-13 Thread Ben Peart
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Monday, September 12, 2016 4:32 PM > To: Ben Peart <peart...@gmail.com> > Cc: git@vger.kernel.org; pclo...@gmail.com; 'Ben Peart' > <benpe...@microsoft.com> > Subject: R

Re: [PATCH v2] checkout: eliminate unnecessary merge for trivial checkout

2016-09-12 Thread Junio C Hamano
"Ben Peart" writes: > I completely agree that optimizing within merge_working_tree would provide > more opportunities for optimization. I can certainly move the test into > that function as a first step. Note that "optimizing more" was not the primary point of my response.

RE: [PATCH v2] checkout: eliminate unnecessary merge for trivial checkout

2016-09-12 Thread Ben Peart
> -Original Message- > From: Junio C Hamano [mailto:gits...@pobox.com] > Sent: Friday, September 9, 2016 5:55 PM > To: Ben Peart <peart...@gmail.com> > Cc: git@vger.kernel.org; pclo...@gmail.com; Ben Peart > <benpe...@microsoft.com> > Subject: R

Re: [PATCH v2] checkout: eliminate unnecessary merge for trivial checkout

2016-09-09 Thread Junio C Hamano
Ben Peart writes: > @@ -802,6 +806,87 @@ static void orphaned_commit_warning(struct commit *old, > struct commit *new) > free(refs.objects); > } > > +static int needs_working_tree_merge(const struct checkout_opts *opts, > + const struct branch_info *old, > +