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

Re: [PATCH 7/7] rerere: get rid of global rerere cache state

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 23, 2026, 17:04 UTC
Message-ID
<xmqqv76s8i12.fsf@gitster.g>
In-Reply-To
<20261023-pks-rerere-wo-the-repository-v1-7-b6ac0c2e4b81@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 8 quoted lines
> The rerere cache state is tracked via a global variable. On the one hand
> this ties it to one specific repository. On the other hand it has the
> consequence that the cache may be leaking state across multiple calls
> into the rerere subsystem.
>
> Refactor the subsystem to instead pass around the rerere cache state
> explicitly and make callers responsible for setting it up and then
> clearing it again.

This step is a logical conclusion of what was done in the previous step. I very much like it.

I was somehow hoping to see that an earlier addition of "enabled" bit to the "struct repository" would be undone and replaced with this structure, but that may not be feasible, I guess.

Queued.
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 9 of 10 in “rerere: remove global state”
  1. 0/7 rerere: remove global statePatrick Steinhardt, Oct 23, 2026
  2. 1/7 rerere: stop using `the_repository` in `rerere_path()`Patrick Steinhardt, Oct 23, 2026
  3. 2/7 rerere: stop using `the_repository` in internal helpersPatrick Steinhardt, Oct 23, 2026
  4. 3/7 rerere: remove redundant calls to `repo_config()`Patrick Steinhardt, Oct 23, 2026
  5. 4/7 rerere: cache result of `is_rerere_enabled()`Patrick Steinhardt, Oct 23, 2026
  6. 5/7 rerere: stop using `the_repository`Patrick Steinhardt, Oct 23, 2026
  7. 6/7 rerere: bundle global state into a structPatrick Steinhardt, Oct 23, 2026
  8. 7/7 rerere: get rid of global rerere cache statePatrick Steinhardt, Oct 23, 2026
  9. Junio C HamanoOct 23, 2026
  10. Patrick SteinhardtOct 26, 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.