Re: [PATCH 01/17] describe: fix accidental oid/hash type-punning

2019-06-20 Thread Jeff King
On Thu, Jun 20, 2019 at 09:32:49AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > The find_commit_name() function passes an object_id.hash as the key of a > > hashmap. That ends up in commit_name_neq(), which then feeds it to > > oideq(). Which means we should actually be the whole "stru

Re: [PATCH 01/17] describe: fix accidental oid/hash type-punning

2019-06-20 Thread Junio C Hamano
Jeff King writes: > The find_commit_name() function passes an object_id.hash as the key of a > hashmap. That ends up in commit_name_neq(), which then feeds it to > oideq(). Which means we should actually be the whole "struct object_id". > > It works anyway because pointers to the two are intercha

[PATCH 01/17] describe: fix accidental oid/hash type-punning

2019-06-20 Thread Jeff King
The find_commit_name() function passes an object_id.hash as the key of a hashmap. That ends up in commit_name_neq(), which then feeds it to oideq(). Which means we should actually be the whole "struct object_id". It works anyway because pointers to the two are interchangeable. And because we're go