# Hamano series makes four unnecessarily public symbols static again

_Leftovers from the removal of the recursive merge strategy and other refactors are being hidden; reviewers like the cleanup._

Section: Patches. Edition of 2026-10-31. Written by an AI editor from the thread "[PATCH 0/4] mark symbols that are unnecessarily public static" (14 messages): https://gitlist.dev/t/66718

Junio C Hamano's cover letter says refactoring and rewrites left some symbols global that started as static, and others no longer need to be visible outside their file. The four patches: remove the unused `author_ident_sufficiently_given()`; hide `init_add_i_state()` and `clear_add_i_state()` and `struct add_i_state` in add-interactive; make `refresh_cache_entry()` static in read-cache.c; and make `verify_uptodate()` static in unpack-trees.c.

Two of the commit messages trace the cause to the removal of the "recursive" merge strategy in ad45b327c0, which took away the last external callers. Patrick Steinhardt noted the add -i declarations became unnecessary after d51b61f5da, which removed add-patch's dependency on add-interactive. Hamano said he had not dug into history for that one.

Jeff King said he eyeballed the whole series and found it reasonable. On big code movements he said they are sometimes annoying in a diff, but the resulting file is nicer to read and maintain. He noted `author_ident_explicitly_given` looks write-only after the series, but is used indirectly through `set_env_if()` and `prepare_fallback_ident()`, so this is a good stopping point.

Steinhardt asked whether the patches should have been one series and whether the forward declaration in the `refresh_cache_entry()` patch could be avoided by moving functions. Hamano said both `refresh_cache_entry()` and `refresh_cache_ent()` would have to move, making an unsightly diff.

Hamano also said that when he tried `git history reword` and `git history fixup`, both ignored `notes.rewriteref` (here refs/notes/amlog). He asked whether this is a known limitation or deliberate. No answer appears in the excerpts.
