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

Re: [PATCH 3/7] oid_array: rename source file from sha1-array

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 15, 2020, 00:34 UTC
Message-ID
<20200415003404.GD7457@syl.local>
In-Reply-To
<20200330140346.GC2456038@coredump.intra.peff.net>
On Mon, Mar 30, 2020 at 10:03:46AM -0400, Jeff King wrote:
Show 16 quoted lines
> We renamed the actual data structure in 910650d2f8 (Rename sha1_array to
> oid_array, 2017-03-31), but the file is still called sha1-array. Besides
> being slightly confusing, it makes it more annoying to grep for leftover
> occurrences of "sha1" in various files, because the header is included
> in so many places.
>
> Let's complete the transition by renaming the source and header files
> (and fixing up a few comment references).
>
> I kept the "-" in the name, as that seems to be our style; cf.
> fc1395f4a4 (sha1_file.c: rename to use dash in file name, 2018-04-10).
> We also have oidmap.h and oidset.h without any punctuation, but those
> are "struct oidmap" and "struct oidset" in the code. We _could_ make
> this "oidarray" to match, but somehow it looks uglier to me because of
> the length of "array" (plus it would be a very invasive patch for little
> gain).

I was wondering what you were planning to do about that. But I think that what you did is the right move. Sure, perhaps it'd be more consistent to call this "oidarray", or rename everything else to "oid_map" and "oid_set".

I prefer what you did here to that, I think because I also find the "oidarray" spelling to be weird.

>
> Signed-off-by: Jeff King <peff@peff.net>
> ---

Thanks, Taylor

Previous: Jeff KingNext: Jeff King
Message 7 of 12 in “oid_array cleanups”
  1. 0/7 oid_array cleanupsJeff King, Mar 30, 2020
  2. 1/7 oid_array: use size_t for count and allocationJeff King, Mar 30, 2020
  3. Jeff KingMar 30, 2020
  4. Taylor BlauApr 15, 2020
  5. 2/7 oid_array: use size_t for iterationJeff King, Mar 30, 2020
  6. 3/7 oid_array: rename source file from sha1-arrayJeff King, Mar 30, 2020
  7. Taylor BlauApr 15, 2020
  8. 4/7 test-tool: rename sha1-array to oid-arrayJeff King, Mar 30, 2020
  9. 5/7 bisect: stop referring to sha1_arrayJeff King, Mar 30, 2020
  10. 6/7 ref-filter: stop referring to "sha1 array"Jeff King, Mar 30, 2020
  11. 7/7 oidset: stop referring to sha1-arrayJeff King, Mar 30, 2020
  12. Taylor BlauApr 15, 2020

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.