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

Re: [PATCH 2/2] dir: improve naming of oid_stat fields in two structs

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 16, 2020, 18:35 UTC
Message-ID
<xmqqo8sw87xj.fsf@gitster.c.googlers.com>
In-Reply-To
<xmqqsgi8882t.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> The potential for confusion with "path to these files" is real, I
> would think, so they may benefit from some prefix.
>
> But instead of basing the prefix on their type, can we name it after
> what this struct holds about the excludes file, and what the data
> the struct holds is used for?  Is "oidst" something that conveys it
> well to the readers of the code?
> ...
> In a sense, this struct is a pared down version of cache_entry that
> keeps the filesystem stat data to allow us quickly find if the path
> was modified, and also lets us know if two contents are the same
> without comparing bytes.  It is a mechanism for us to tell validity
> of our cached data.  "struct path_validity" perhaps?  I dunno.

I think "path_validity", while it probably is much better than "oid_stat", is a horrible name for the struct, so I'd welcome suggestions from third-party ;-)

But I think renaming "ss_info_exclude" to "info_exclude_validity" (or any name that talks about "info/exclude" and "validity") would be a vast improvement, regardless of what the struct is called.

Previous: Junio C HamanoNext: Jeff King
Message 8 of 13 in “dir: update outdated fields and comments about oid_stat”
  1. 0/2 dir: update outdated fields and comments about oid_statMatheus Tavares, Mar 16, 2020
  2. 1/2 dir: fix outdated comment on add_patterns()Matheus Tavares, Mar 16, 2020
  3. 2/2 dir: improve naming of oid_stat fields in two structsMatheus Tavares, Mar 16, 2020
  4. Junio C HamanoMar 16, 2020
  5. Patryk ObaraMar 16, 2020
  6. Matheus Tavares BernardinoMar 16, 2020
  7. Junio C HamanoMar 16, 2020
  8. Junio C HamanoMar 16, 2020
  9. Jeff KingMar 16, 2020
  10. 0/3 dir: update outdated field names and comments about oid_statMatheus Tavares, Mar 17, 2020
  11. 1/3 dir: fix outdated comment on add_patterns()Matheus Tavares, Mar 17, 2020
  12. 2/3 dir: improve naming of oid_stat fields in two structsMatheus Tavares, Mar 17, 2020
  13. 3/3 dir: update outdated comments about untracked cacheMatheus Tavares, Mar 17, 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.