From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 7/7] rerere: get rid of global rerere cache state
Date: Fri, 23 Oct 2026 10:04:57 -0700 [thread overview]
Message-ID: <xmqqv76s8i12.fsf@gitster.g> (raw)
In-Reply-To: <20261023-pks-rerere-wo-the-repository-v1-7-b6ac0c2e4b81@pks.im> (Patrick Steinhardt's message of "Fri, 23 Oct 2026 14:50:24 +0200")
Patrick Steinhardt <ps@pks.im> writes:
> 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.
next prev parent reply other threads:[~2026-10-23 17:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 12:50 [PATCH 0/7] rerere: remove global state Patrick Steinhardt
2026-10-23 12:50 ` [PATCH 1/7] rerere: stop using `the_repository` in `rerere_path()` Patrick Steinhardt
2026-10-23 12:50 ` [PATCH 2/7] rerere: stop using `the_repository` in internal helpers Patrick Steinhardt
2026-10-23 12:50 ` [PATCH 3/7] rerere: remove redundant calls to `repo_config()` Patrick Steinhardt
2026-10-23 12:50 ` [PATCH 4/7] rerere: cache result of `is_rerere_enabled()` Patrick Steinhardt
2026-10-23 12:50 ` [PATCH 5/7] rerere: stop using `the_repository` Patrick Steinhardt
2026-10-23 12:50 ` [PATCH 6/7] rerere: bundle global state into a struct Patrick Steinhardt
2026-10-23 12:50 ` [PATCH 7/7] rerere: get rid of global rerere cache state Patrick Steinhardt
2026-10-23 17:04 ` Junio C Hamano [this message]
2026-10-26 7:28 ` Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqv76s8i12.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox