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

Re: [PATCH/RFC] Replace ce_namelen() with a ce_namelen field

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 4, 2012, 19:26 UTC
Message-ID
<7vtxxns4z4.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1341393528-21037-1-git-send-email-t.gummerer@gmail.com>
Thomas Gummerer <t.gummerer@gmail.com> writes:
> Replace the ce_namelen() function in cache.h with a ce_namelen
> field in struct cache_entry.

NAK, at least in this form that duplicates the same information in ce_namelen (new field) and bits in ce_flags, making it easier for them to go out of sync with new bugs (or misconversions in this patch, if there is one).

At least, keep the ce_namelen() inline used in the existing calling site, as the whole point of it is that they do not have to care how the name length is stored or computed.

Previous: Nguyen Thai Ngoc DuyNext: Thomas Gummerer
Message 5 of 18 in “Replace ce_namelen() with a ce_namelen field”
  1. Replace ce_namelen() with a ce_namelen fieldThomas Gummerer, Jul 4, 2012
  2. Thomas RastJul 4, 2012
  3. Nguyen Thai Ngoc DuyJul 4, 2012
  4. Nguyen Thai Ngoc DuyJul 4, 2012
  5. Junio C HamanoJul 4, 2012
  6. Introduction of a ce_namelen fieldThomas Gummerer, Jul 6, 2012
  7. 1/2 Strip namelen out of ce_flags into a ce_namelen fieldThomas Gummerer, Jul 6, 2012
  8. Junio C HamanoJul 9, 2012
  9. 0/3 Introduction of a ce_namelen fieldThomas Gummerer, Jul 11, 2012
  10. 1/3 read-cache.c: Handle long filenames correctlyThomas Gummerer, Jul 11, 2012
  11. Nguyen Thai Ngoc DuyJul 11, 2012
  12. Junio C HamanoJul 11, 2012
  13. 2/3 Strip namelen out of ce_flags into a ce_namelen fieldThomas Gummerer, Jul 11, 2012
  14. 3/3 Replace strlen() with ce_namelen()Thomas Gummerer, Jul 11, 2012
  15. Junio C HamanoJul 11, 2012
  16. Junio C HamanoJul 11, 2012
  17. 2/2 Replace strlen() with ce_namelen()Thomas Gummerer, Jul 6, 2012
  18. Junio C HamanoJul 9, 2012

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.