Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/4] refs/reftable: don't write new table on dry-run expire
Date: Wed, 18 Nov 2026 13:05:31 +0100	[thread overview]
Message-ID: <av2Ui2uOeUoES0-a@pks.im> (raw)
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:
> 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

  reply	other threads:[~2026-11-18 12:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  9:30 [PATCH 0/4] Improve performance of reflog expiration Patrick Steinhardt
2026-11-18  9:31 ` [PATCH 1/4] refs/reftable: don't write new table on dry-run expire Patrick Steinhardt
2026-11-18 11:28   ` Karthik Nayak
2026-11-18 12:05     ` Patrick Steinhardt [this message]
2026-11-18 16:51   ` Junio C Hamano
2026-11-18  9:31 ` [PATCH 2/4] refs/reftable: don't write new table when expire is a no-op Patrick Steinhardt
2026-11-18 11:33   ` Karthik Nayak
2026-11-18 12:05     ` Patrick Steinhardt
2026-11-18 15:34   ` Toon Claes
2026-11-18  9:31 ` [PATCH 3/4] builtin/maintenance: only consider `gc.reflogExpire` for "--auto" Patrick Steinhardt
2026-11-18 15:52   ` Toon Claes
2026-11-18  9:31 ` [PATCH 4/4] Documentation/config: fix typo in "maintenance.reflog-expire.auto" Patrick Steinhardt
2026-11-18 15:54   ` Toon Claes
2026-11-18 15:56 ` [PATCH 0/4] Improve performance of reflog expiration Toon Claes

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=av2Ui2uOeUoES0-a@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    /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