Re: [PATCH v2 18/19] tree-diff: rework diff_tree() to generate diffs for multiparent cases as well

2014-04-07 Thread Kirill Smelkov
On Mon, Apr 07, 2014 at 10:29:46AM -0700, Junio C Hamano wrote: > Kirill Smelkov writes: > > > The following > > ... > > maybe looks a bit simpler, but calls tree_entry_pathcmp twice more times. > > > > Besides for important nparent=1 case we were not calling > > tree_entry_pathcmp at all and her

Re: [PATCH v2 18/19] tree-diff: rework diff_tree() to generate diffs for multiparent cases as well

2014-04-07 Thread Junio C Hamano
Kirill Smelkov writes: >> > + if (!DIFF_OPT_TST(opt, FIND_COPIES_HARDER)) { >> > + for (i = 0; i < nparent; ++i) >> > + if (tp[i].entry.mode & S_IFXMIN_NEQ) >> > + goto skip_emit_tp

Re: [PATCH v2 18/19] tree-diff: rework diff_tree() to generate diffs for multiparent cases as well

2014-04-07 Thread Junio C Hamano
Kirill Smelkov writes: > The following > ... > maybe looks a bit simpler, but calls tree_entry_pathcmp twice more times. > > Besides for important nparent=1 case we were not calling > tree_entry_pathcmp at all and here we'll call it once, which would slow > execution down a bit, as base_name_comp

Re: [PATCH v2 18/19] tree-diff: rework diff_tree() to generate diffs for multiparent cases as well

2014-04-06 Thread Kirill Smelkov
Junio, First of all thanks a lot for reviewing this patch. I'll reply inline with corrected version attached in the end. On Fri, Apr 04, 2014 at 11:42:39AM -0700, Junio C Hamano wrote: > Kirill Smelkov writes: > > > +extern > > +struct combine_diff_path *diff_tree_paths( > > These two on the s

Re: [PATCH v2 18/19] tree-diff: rework diff_tree() to generate diffs for multiparent cases as well

2014-04-04 Thread Junio C Hamano
Kirill Smelkov writes: > +extern > +struct combine_diff_path *diff_tree_paths( These two on the same line, please. > + struct combine_diff_path *p, const unsigned char *sha1, > + const unsigned char **parent_sha1, int nparent, > + struct strbuf *base, struct diff_options *opt); > e

Re: [PATCH v2 18/19] tree-diff: rework diff_tree() to generate diffs for multiparent cases as well

2014-03-27 Thread Kirill Smelkov
On Mon, Feb 24, 2014 at 08:21:50PM +0400, Kirill Smelkov wrote: [...] > not changed: > > - low-level helpers are still named with "__" prefix as, imho, that is the > best > convention to name such helpers, without sacrificing signal/noise ratio. All > of them are now static though. Please fi