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

Re: [PATCH] add -i: hide init/clear_add_i_state() functions

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 30, 2026, 15:30 UTC
Message-ID
<xmqqv76jxl22.fsf@gitster.g>
In-Reply-To
<auRlfDXPhp3RjNyk@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 12 quoted lines
> On Wed, Oct 28, 2026 at 12:57:51PM -0700, Junio C Hamano wrote:
>> The "add -i" machinery is encapsulated in run_add_i() function,
>> which uses init_add_i_state() to initialize the machinery, does its
>> thing, and clear_add_i_state() to tear it down.  External callers
>> have no need to call anything other than run_add_i().
>> 
>> Make init/clear_add_i_state() file-scope static functions, and
>> "struct add_i_state" type as well.
>
> Nice cleanup. For historical context, these declarations are not needed
> anymore starting with d51b61f5dab (add-patch: remove dependency on
> "add-interactive" subsystem, 2026-03-02).

Thanks. I did not notice that I gave a backstory for the other three commits but apparently did so without digging into the history for this one.

By the way, I queued the patches sent to the list on a branch (I initially made them on a detached HEAD without keeping a local copy after sending them out) and tried 'git history reword' to update this one, but it seems it does not honor the notes.rewriteref configuration variable. I wonder if this is a known limitation, or a deliberate design.

Thanks.
Previous: Patrick SteinhardtNext: Ben Knoble
Message 4 of 6 in “add -i: hide init/clear_add_i_state() functions”
  1. add -i: hide init/clear_add_i_state() functionsJunio C Hamano, Oct 28, 2026
  2. Ben KnobleOct 28, 2026
  3. Patrick SteinhardtOct 30, 2026
  4. Junio C HamanoOct 30, 2026
  5. Ben KnobleOct 30, 2026
  6. Patrick SteinhardtNov 2, 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.