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

Re: [PATCH 0/4] mark symbols that are unnecessarily public static

From
Jeff King <peff@peff.net>
Date
Oct 30, 2026, 18:26 UTC
Message-ID
<20261030182648.GE7582@coredump.intra.peff.net>
In-Reply-To
<20261030173956.585250-1-gitster@pobox.com>
On Fri, Oct 30, 2026 at 10:39:52AM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> Over the years, refactoring various subsystems, adding new callers,
> and rewriting them from scratch, made some symbols that started as
> static into global, and some other symbols that started as global,
> no longer need to be visible outside a file that use them.  Here is
> a small patch series that turns them back into file-scope static.
> 
> Honestly, I suspect that [3/4] was probably better with a forward
> declaration in the preview I sent earlier, but in the longer term,
> readers would not care if this conversion ended up in a large code
> movement, as they do not have to even know it.

The subject for patch 1 caught my eye, but I eyeballed the whole series and they all look reasonable to me. I agree that big code movement is sometimes annoying in a diff, but the flip side is that the resulting file is nicer to read and maintain.

-Peff
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 13 of 14 in “mark symbols that are unnecessarily public static”
  1. 0/4 mark symbols that are unnecessarily public staticJunio C Hamano, Oct 30, 2026
  2. 1/4 ident: remove unused author_ident_sufficiently_given()Junio C Hamano, Oct 30, 2026
  3. Jeff KingOct 30, 2026
  4. Patrick SteinhardtNov 3, 2026
  5. Junio C HamanoNov 3, 2026
  6. Patrick SteinhardtNov 4, 2026
  7. 2/4 add -i: hide init/clear_add_i_state() functionsJunio C Hamano, Oct 30, 2026
  8. Patrick SteinhardtNov 3, 2026
  9. Junio C HamanoNov 3, 2026
  10. 3/4 read-cache: hide refresh_cache_entry()Junio C Hamano, Oct 30, 2026
  11. Jeff KingOct 30, 2026
  12. 4/4 unpack-trees: hide verify_uptodate()Junio C Hamano, Oct 30, 2026
  13. Jeff KingOct 30, 2026
  14. Patrick SteinhardtNov 3, 2026

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.