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

Re: [PATCH 1/4] refs/reftable: don't write new table on dry-run expire

From
Patrick Steinhardt <ps@pks.im>
Date
Nov 18, 2026, 12:05 UTC
Message-ID
<av2Ui2uOeUoES0-a@pks.im>
In-Reply-To
<CAOLa=ZSx=m=5+Jw8JzKXutaYp_mKOWbSsBVTHtMT3rDUk3a=eA@mail.gmail.com>
On Wed, Nov 18, 2026 at 03:28:25AM -0800, Karthik Nayak wrote:
Show 23 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
> > diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c
> > index 3ba6a9ac0db..4216a18684d 100644
> > --- a/refs/reftable-backend.c
> > +++ b/refs/reftable-backend.c
> > @@ -2706,6 +2706,11 @@ static int reftable_be_reflog_expire(struct ref_store *ref_store,
> >  	if (flags & EXPIRE_REFLOGS_UPDATE_REF && last_hash && !is_null_oid(&oid))
> >  		oidread(&arg.update_oid, last_hash, ref_store->repo->hash_algo);
> >
> > +	if ((flags & EXPIRE_REFLOGS_DRY_RUN)) {
> > +		ret = 0;
> > +		goto done;
> > +	}
> > +
> >  	arg.refs = refs;
> >  	arg.records = rewritten;
> >  	arg.len = logs_nr;
> > @@ -2720,8 +2725,7 @@ static int reftable_be_reflog_expire(struct ref_store *ref_store,
> >  	 * Future improvement: we could skip writing records that were
> >  	 * not changed.
> >  	 */
> 
> This comment doesn't seem to get removed in the following patch.

That's because I don't fully consider this comment to be addressed. If I understand correctly, this also speaks about the fact that we could drop rewriting entries in a finer-grained way. All I'm changing is that we now don't write any entries in case none of them need to be rewritten.

Patrick
Previous: Karthik NayakNext: Junio C Hamano
Message 4 of 18 in “Improve performance of reflog expiration”
  1. 0/4 Improve performance of reflog expirationPatrick Steinhardt, Nov 18, 2026
  2. 1/4 refs/reftable: don't write new table on dry-run expirePatrick Steinhardt, Nov 18, 2026
  3. Karthik NayakNov 18, 2026
  4. Patrick SteinhardtNov 18, 2026
  5. Junio C HamanoNov 18, 2026
  6. Patrick SteinhardtNov 19, 2026
  7. 2/4 refs/reftable: don't write new table when expire is a no-opPatrick Steinhardt, Nov 18, 2026
  8. Karthik NayakNov 18, 2026
  9. Patrick SteinhardtNov 18, 2026
  10. Toon ClaesNov 18, 2026
  11. Patrick SteinhardtNov 19, 2026
  12. 3/4 builtin/maintenance: only consider `gc.reflogExpire` for "--auto"Patrick Steinhardt, Nov 18, 2026
  13. Toon ClaesNov 18, 2026
  14. Patrick SteinhardtNov 19, 2026
  15. 4/4 Documentation/config: fix typo in "maintenance.reflog-expire.auto"Patrick Steinhardt, Nov 18, 2026
  16. Toon ClaesNov 18, 2026
  17. Toon ClaesNov 18, 2026
  18. Patrick SteinhardtNov 19, 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.