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

Re: [PATCH v3 4/5] dir.c: rename to name_compare()

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jun 18, 2014, 19:09 UTC
Message-ID
<20140618190956.GU8557@google.com>
In-Reply-To
<1403117117-10384-5-git-send-email-jmmahler@gmail.com>
Jeremiah Mahler wrote:
>     This is a case where cache_name_compare() was used even though it had
>     nothing to do with a cache.  The new name makes it clear that no cache
>     is involved.
That's a perfect sort of thing to put in the commit message. ;-)

Unlike patches 2 and 3, this could make sense to me as a separate patch from 1/5. Except... how does git work at all with patch 1 and without this patch? I thought that patch removed the public cache_name_compare function.

Would it make sense to delay the removal of cache_name_compare until a patch at the end of the series?

The patch is small enough that squashing into patch 1 seems fine, too.
[...]
> Rename the call to cache_name_compare() to name_compare().

It's not actually renaming but calling a different function, right? So I'd say something like

	read_directory: use name_compare instead of cache_name_compare
	This is a case where cache_name_compare() was used even though it had
	nothing to do with a cache.  The new name makes it clear that no cache
	is involved.
	No functional change intended.

Thanks, Jonathan

Previous: Jeremiah MahlerNext: Jeremiah Mahler
Message 10 of 15 in “cleanup duplicate name_compare() functions”
  1. 0/5 cleanup duplicate name_compare() functionsJeremiah Mahler, Jun 18, 2014
  2. 1/5 cache: rename cache_name_compare() to name_compare()Jeremiah Mahler, Jun 18, 2014
  3. Jonathan NiederJun 18, 2014
  4. 2/5 tree-walk.c: remove name_compare() functionJeremiah Mahler, Jun 18, 2014
  5. Jonathan NiederJun 18, 2014
  6. Jeremiah MahlerJun 19, 2014
  7. 3/5 unpack-trees.c: remove name_compare() functionJeremiah Mahler, Jun 18, 2014
  8. Jonathan NiederJun 18, 2014
  9. 4/5 dir.c: rename to name_compare()Jeremiah Mahler, Jun 18, 2014
  10. Jonathan NiederJun 18, 2014
  11. 5/5 name-hash.c: rename to name_compare()Jeremiah Mahler, Jun 18, 2014
  12. Jonathan NiederJun 18, 2014
  13. Jonathan NiederJun 18, 2014
  14. Jeremiah MahlerJun 19, 2014
  15. Jeff KingJun 19, 2014

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.