Re: [PATCH 01/17] cache: update object ID functions for the_hash_algo

2018-07-09 Thread brian m. carlson
On Sun, Jul 08, 2018 at 09:31:42PM -0700, Jacob Keller wrote: > On Sun, Jul 8, 2018 at 9:05 PM Eric Sunshine wrote: > > > > On Sun, Jul 8, 2018 at 10:38 PM Jacob Keller wrote: > > > On Sun, Jul 8, 2018 at 4:39 PM brian m. carlson > > > wrote: > > > > static inline int oidcmp(const struct object

Re: [PATCH 01/17] cache: update object ID functions for the_hash_algo

2018-07-08 Thread Jacob Keller
On Sun, Jul 8, 2018 at 9:05 PM Eric Sunshine wrote: > > On Sun, Jul 8, 2018 at 10:38 PM Jacob Keller wrote: > > On Sun, Jul 8, 2018 at 4:39 PM brian m. carlson > > wrote: > > > static inline int oidcmp(const struct object_id *oid1, const struct > > > object_id *oid2) > > > { > > > - ret

Re: [PATCH 01/17] cache: update object ID functions for the_hash_algo

2018-07-08 Thread Eric Sunshine
On Sun, Jul 8, 2018 at 10:38 PM Jacob Keller wrote: > On Sun, Jul 8, 2018 at 4:39 PM brian m. carlson > wrote: > > static inline int oidcmp(const struct object_id *oid1, const struct > > object_id *oid2) > > { > > - return hashcmp(oid1->hash, oid2->hash); > > + return memcmp(oid1->

Re: [PATCH 01/17] cache: update object ID functions for the_hash_algo

2018-07-08 Thread Jacob Keller
On Sun, Jul 8, 2018 at 4:39 PM brian m. carlson wrote: > static inline int oidcmp(const struct object_id *oid1, const struct > object_id *oid2) > { > - return hashcmp(oid1->hash, oid2->hash); > + return memcmp(oid1->hash, oid2->hash, the_hash_algo->rawsz); > } > Just curious, what

[PATCH 01/17] cache: update object ID functions for the_hash_algo

2018-07-08 Thread brian m. carlson
Update the hashcpy and hashclr functions to use the_hash_algo, since they are used in a variety of places to copy and manipulate buffers that need to move data into or out of struct object_id. Update oidcmp so that it is implemented on its own and similarly uses the_hash_algo. Signed-off-by: bria