Re: [[PATCH v2] 1/4] patch-ids: stop using a hand-rolled hashmap implementation

2016-08-02 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >> Oh, we are already safely in Unrelated Tangent Land for a while, I would >> think. Nothing of what we are discussing in this thread has anything to do >> with Kevin's patch series,... > > Oh, no question about that. Go back to my review,

Re: [[PATCH v2] 1/4] patch-ids: stop using a hand-rolled hashmap implementation

2016-08-02 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Junio, > > On Mon, 1 Aug 2016, Junio C Hamano wrote: > >> Johannes Schindelin writes: >> >> > It would be a serious bug if hashmap_entry_init() played games with >> > references, given its signature (that this function does not have any >> > access to the hashma

Re: [[PATCH v2] 1/4] patch-ids: stop using a hand-rolled hashmap implementation

2016-08-02 Thread Johannes Schindelin
Hi Junio, On Mon, 1 Aug 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > It would be a serious bug if hashmap_entry_init() played games with > > references, given its signature (that this function does not have any > > access to the hashmap structure, only to the entry itself): >

Re: [[PATCH v2] 1/4] patch-ids: stop using a hand-rolled hashmap implementation

2016-08-01 Thread Eric Wong
Junio C Hamano wrote: > Johannes Schindelin writes: > > > It would be a serious bug if hashmap_entry_init() played games with > > references, given its signature (that this function does not have any > > access to the hashmap structure, only to the entry itself): > > > > void hashmap_entry_i

Re: [[PATCH v2] 1/4] patch-ids: stop using a hand-rolled hashmap implementation

2016-08-01 Thread Junio C Hamano
Johannes Schindelin writes: > It would be a serious bug if hashmap_entry_init() played games with > references, given its signature (that this function does not have any > access to the hashmap structure, only to the entry itself): > > void hashmap_entry_init(void *entry, unsigned int hash)

Re: [[PATCH v2] 1/4] patch-ids: stop using a hand-rolled hashmap implementation

2016-08-01 Thread Johannes Schindelin
Hi Junio, first of all: Kevin & I are colleagues and I helped prepare this patch series. I had the idea to have a two-level patch ID to help e.g. when an alternate object store is hosted on a (slow) network drive. On Fri, 29 Jul 2016, Junio C Hamano wrote: > Kevin Willford writes: > > > struc

Re: [[PATCH v2] 1/4] patch-ids: stop using a hand-rolled hashmap implementation

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) > { > + return hashcmp(a->patch_id, b->patch_id); > } > > int init_patch_ids(struct patch_ids *ids) > { > memset(ids, 0, sizeof(

Re: [[PATCH v2] 1/4] patch-ids: stop using a hand-rolled hashmap implementation

2016-07-29 Thread Junio C Hamano
Kevin Willford writes: > From: Kevin Willford > > This change will use the hashmap from the hashmap.h to keep track of the > patch_ids that have been encountered instead of using an internal > implementation. This simplifies the implementation of the patch ids. > > Signed-off-by: Kevin Willford

[[PATCH v2] 1/4] patch-ids: stop using a hand-rolled hashmap implementation

2016-07-29 Thread Kevin Willford
From: Kevin Willford This change will use the hashmap from the hashmap.h to keep track of the patch_ids that have been encountered instead of using an internal implementation. This simplifies the implementation of the patch ids. Signed-off-by: Kevin Willford --- patch-ids.c | 86 +