Re: [[PATCH v2] 4/4] rebase: avoid computing unnecessary patch IDs

2016-08-04 Thread Johannes Schindelin
Hi Junio, On Wed, 3 Aug 2016, Junio C Hamano wrote: > Junio C Hamano writes: > > > I do not think negative (or non-zero) return is an "abuse" at all. > > It is misleading in the context of the function whose name has "cmp" > > in it, but that is not the fault of this

Re: [[PATCH v2] 4/4] rebase: avoid computing unnecessary patch IDs

2016-08-03 Thread Junio C Hamano
Junio C Hamano writes: > I do not think negative (or non-zero) return is an "abuse" at all. > It is misleading in the context of the function whose name has "cmp" > in it, but that is not the fault of this function, rather, the > breakage is more in the API that calls a

Re: [[PATCH v2] 4/4] rebase: avoid computing unnecessary patch IDs

2016-08-02 Thread Junio C Hamano
Johannes Schindelin writes: >> Perhaps hashmap API needs fixing in the longer term not to call this >> type hashmap_cmp_fn; instead it should lose cmp and say something >> like hashmap_eq_fn or something. > > Maybe. > > But to make sure: you do not expect Kevin to do

Re: [[PATCH v2] 4/4] rebase: avoid computing unnecessary patch IDs

2016-08-02 Thread Junio C Hamano
Jakub Narębski writes: > The problem is that one expects hashmap_cmp_fn() to return ==0 on equality, > while one would expect for hashmap_eq_fn() to return true (==1) on equality. > So we would have to rewrite all calling sites. Yes, and I do not think it is a "problem".

Re: [[PATCH v2] 4/4] rebase: avoid computing unnecessary patch IDs

2016-08-02 Thread Johannes Schindelin
Hi Junio, On Mon, 1 Aug 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > On Fri, 29 Jul 2016, Junio C Hamano wrote: > > > >> Kevin Willford writes: > >> > >> > static int patch_id_cmp(struct patch_id *a, > >> >

Re: [[PATCH v2] 4/4] rebase: avoid computing unnecessary patch IDs

2016-08-02 Thread Jakub Narębski
W dniu 01.08.2016 o 22:11, Junio C Hamano pisze: > Johannes Schindelin writes: >> On Fri, 29 Jul 2016, Junio C Hamano wrote: >>> These error returns initially looks slightly iffy in that in general >>> the caller of any_cmp_fn() wants to know how a/b compares, but by

Re: [[PATCH v2] 4/4] rebase: avoid computing unnecessary patch IDs

2016-08-01 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Junio, > > On Fri, 29 Jul 2016, Junio C Hamano wrote: > >> Kevin Willford writes: >> >> > static int patch_id_cmp(struct patch_id *a, >> >struct patch_id *b, >> > - void

Re: [[PATCH v2] 4/4] rebase: avoid computing unnecessary patch IDs

2016-08-01 Thread Johannes Schindelin
Hi Junio, On Fri, 29 Jul 2016, Junio C Hamano wrote: > Kevin Willford writes: > > > static int patch_id_cmp(struct patch_id *a, > > struct patch_id *b, > > - void *keydata) > > + struct diff_options *opt) > > { > >

Re: [[PATCH v2] 4/4] rebase: avoid computing unnecessary patch IDs

2016-07-29 Thread Junio C Hamano
Kevin Willford writes: > static int patch_id_cmp(struct patch_id *a, > struct patch_id *b, > - void *keydata) > + struct diff_options *opt) > { > + if (is_null_sha1(a->patch_id) && > +

[[PATCH v2] 4/4] rebase: avoid computing unnecessary patch IDs

2016-07-29 Thread Kevin Willford
From: Kevin Willford The `rebase` family of Git commands avoid applying patches that were already integrated upstream. They do that by using the revision walking option that computes the patch IDs of the two sides of the rebase (local-only patches vs upstream-only ones)