Re: [PATCH] rerere: match the hash algorithm with its length
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Jul 24, 2023, 21:22 UTC
- Message-ID
- <ZL7rn+LTVjSFzrI8@tapette.crustytoothpaste.net>
- In-Reply-To
- <xmqqr0oyr3y0.fsf@gitster.g>
On 2023-07-23 at 16:24:39, Junio C Hamano wrote:
Show 17 quoted lines
> "brian m. carlson" <sandals@crustytoothpaste.net> writes:
>
> > I agree consistency here is a good idea. However, I should point out
> > the definition of `get_sha1_hex`:
> >
> > int get_sha1_hex(const char *hex, unsigned char *sha1)
> > {
> > return get_hash_hex_algop(hex, sha1, the_hash_algo);
> > }
>
> Yeah, I think I lifted the inlining from there, and you are
> absolutely right. I think the main source of the confusion is that
> get_sha1_hex(), while it was a perfectly good name before the
> "struct object_id" world, has now become a misnomer.
>
> I'd retract the patch you reviewed, but now I wonder if the
> following is a good idea.Yeah, I think that's a great idea, especially since now there are only a handful of those calls left.
-- brian m. carlson (he/him or they/them) Toronto, Ontario, CA