git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 5 in “rerere: match the hash algorithm with its length”
  1. rerere: match the hash algorithm with its lengthJunio C Hamano, Jul 21, 2023
  2. brian m. carlsonJul 23, 2023
  3. Junio C HamanoJul 23, 2023
  4. brian m. carlsonJul 24, 2023
  5. Re* [PATCH] rerere: match the hash algorithm with its lengthJunio C Hamano, Jul 24, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.