From: Patrick Steinhardt <ps@pks.im>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org,
"Mark C. Chu-Carroll" <markchucarroll@fastmail.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v4 00/12] builtin/rerere: convert to use subcommands
Date: Fri, 13 Nov 2026 08:20:35 +0100 [thread overview]
Message-ID: <ava6Q1u65ASVeth5@pks.im> (raw)
In-Reply-To: <CAOLa=ZTAYtq0K4YfcSBocf-fxadTiaJp+AV5-_6_pbNMBwYQXA@mail.gmail.com>
On Thu, Nov 12, 2026 at 05:41:29AM -0800, Karthik Nayak wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> > Range-diff versus v3:
> >
> > 1: e9237465706 = 1: f669dc6eddf rerere: rename `repo_rerere()`
> > 2: 94d91a0620d ! 2: 4fd3f6aa650 rerere: convert flags into an enum
> > @@ Commit message
> > around as enums so that it becomes trivial to see what kind of flags are
> > expected. Adapt the rerere flags accordingly and document them.
> >
> > + While at it, detect the case where both `RERERE_AUTOUPDATE` and
> > + `RERERE_NOAUTOUPDATE` are passed. This combination does not make a lot
> > + of sense, and it's not obvious which of those flags takes precedence
> > + (it's `RERERE_AUTOUPDATE`). All current callers know to only pass one of
> > + those flags, but let's be safe rather than sorry and `BUG()` in case
> > + both are passed.
> > +
> > Signed-off-by: Patrick Steinhardt <ps@pks.im>
> >
> > ## rerere.c ##
> > @@ rerere.c: static int is_rerere_enabled(struct repository *r)
> > {
> > int lock_timeout_ms = 1000;
> > int fd;
> > +@@ rerere.c: int rerere_cache_setup(struct rerere_cache *cache,
> > + repo_config_get_bool(r, "rerere.autoupdate", &cache->autoupdate);
> > + repo_config_get_int(r, "rerere.locktimeout", &lock_timeout_ms);
> > +
> > ++ if ((flags & RERERE_AUTOUPDATE) && (flags & RERERE_NOAUTOUPDATE))
> > ++ BUG("RERERE_AUTOUPDATE cannot be used with RERERE_NOAUTOUPDATE");
> > + if (flags & (RERERE_AUTOUPDATE|RERERE_NOAUTOUPDATE))
> > + cache->autoupdate = !!(flags & RERERE_AUTOUPDATE);
> > + if ((flags & RERERE_READONLY) && (flags & RERERE_NOWAIT))
> > @@ rerere.c: int rerere_cache_setup(struct rerere_cache *cache,
> > return fd;
> > }
> > @@ rerere.h: struct rerere_id {
> > + RERERE_AUTOUPDATE = (1 << 0),
> > +
> > + /*
> > -+ * Reverse of RERERE_AUTOUPDATE. That is, update the file in the
> > -+ * working tree but don't touch the index.
> > ++ * update the file in the working tree but don't touch the index. This
>
> Nit: s/update/Update
Oops, good catch. I'll refrain from sending out another version just to
fix this one fix though. Junio, I'd appreciate it if you could fix this
up in your tree. Thanks!
Patrick
prev parent reply other threads:[~2026-11-13 7:20 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 10:46 [PATCH 00/12] builtin/rerere: convert to use subcommands Patrick Steinhardt
2026-10-27 10:46 ` [PATCH 01/12] rerere: rename `repo_rerere()` Patrick Steinhardt
2026-10-27 19:48 ` Junio C Hamano
2026-10-28 8:33 ` Patrick Steinhardt
2026-10-28 16:25 ` Junio C Hamano
2026-10-27 10:46 ` [PATCH 02/12] rerere: convert flags into an enum Patrick Steinhardt
2026-10-27 14:47 ` Mark C. Chu-Carroll
2026-10-27 19:40 ` Junio C Hamano
2026-10-28 8:33 ` Patrick Steinhardt
2026-10-28 14:11 ` Mark C. Chu-Carroll
2026-10-28 16:25 ` Junio C Hamano
2026-10-27 10:46 ` [PATCH 03/12] builtin/rerere: drop `the_repository` Patrick Steinhardt
2026-10-27 10:46 ` [PATCH 04/12] builtin/rerere: stop passing flags to subcommands that ignore them Patrick Steinhardt
2026-10-27 10:46 ` [PATCH 05/12] builtin/rerere: turn "forget" into a proper subcommand Patrick Steinhardt
2026-10-27 10:46 ` [PATCH 06/12] builtin/rerere: turn "clear" " Patrick Steinhardt
2026-10-27 10:46 ` [PATCH 07/12] builtin/rerere: turn "status" " Patrick Steinhardt
2026-10-27 10:46 ` [PATCH 08/12] builtin/rerere: turn "remaining" " Patrick Steinhardt
2026-10-27 10:46 ` [PATCH 09/12] builtin/rerere: turn "diff" " Patrick Steinhardt
2026-10-27 10:46 ` [PATCH 10/12] builtin/rerere: turn "gc" " Patrick Steinhardt
2026-10-27 10:46 ` [PATCH 11/12] builtin/rerere: use `OPT_SUBCOMMAND()` Patrick Steinhardt
2026-10-27 10:46 ` [PATCH 12/12] builtin/rerere: introduce proper usage strings for subcommands Patrick Steinhardt
2026-10-27 19:52 ` [PATCH 00/12] builtin/rerere: convert to use subcommands Junio C Hamano
2026-10-29 9:57 ` [PATCH v2 " Patrick Steinhardt
2026-10-29 9:57 ` [PATCH v2 01/12] rerere: rename `repo_rerere()` Patrick Steinhardt
2026-10-29 9:57 ` [PATCH v2 02/12] rerere: convert flags into an enum Patrick Steinhardt
2026-11-06 10:51 ` Karthik Nayak
2026-11-06 11:39 ` Patrick Steinhardt
2026-11-06 13:50 ` Karthik Nayak
2026-10-29 9:57 ` [PATCH v2 03/12] builtin/rerere: drop `the_repository` Patrick Steinhardt
2026-10-29 9:57 ` [PATCH v2 04/12] builtin/rerere: stop passing flags to subcommands that ignore them Patrick Steinhardt
2026-10-29 9:57 ` [PATCH v2 05/12] builtin/rerere: turn "forget" into a proper subcommand Patrick Steinhardt
2026-10-29 9:57 ` [PATCH v2 06/12] builtin/rerere: turn "clear" " Patrick Steinhardt
2026-10-29 9:57 ` [PATCH v2 07/12] builtin/rerere: turn "status" " Patrick Steinhardt
2026-10-29 9:57 ` [PATCH v2 08/12] builtin/rerere: turn "remaining" " Patrick Steinhardt
2026-10-29 9:57 ` [PATCH v2 09/12] builtin/rerere: turn "diff" " Patrick Steinhardt
2026-10-29 9:57 ` [PATCH v2 10/12] builtin/rerere: turn "gc" " Patrick Steinhardt
2026-11-06 10:56 ` Karthik Nayak
2026-10-29 9:57 ` [PATCH v2 11/12] builtin/rerere: use `OPT_SUBCOMMAND()` Patrick Steinhardt
2026-11-06 11:44 ` Karthik Nayak
2026-11-06 14:25 ` Patrick Steinhardt
2026-10-29 9:57 ` [PATCH v2 12/12] builtin/rerere: introduce proper usage strings for subcommands Patrick Steinhardt
2026-11-06 11:45 ` [PATCH v2 00/12] builtin/rerere: convert to use subcommands Karthik Nayak
2026-11-06 15:13 ` [PATCH v3 " Patrick Steinhardt
2026-11-06 15:13 ` [PATCH v3 01/12] rerere: rename `repo_rerere()` Patrick Steinhardt
2026-11-06 15:13 ` [PATCH v3 02/12] rerere: convert flags into an enum Patrick Steinhardt
2026-11-06 16:39 ` Junio C Hamano
2026-11-09 7:06 ` Patrick Steinhardt
2026-11-09 15:40 ` Junio C Hamano
2026-11-09 19:13 ` Junio C Hamano
2026-11-11 11:02 ` Patrick Steinhardt
2026-11-06 15:13 ` [PATCH v3 03/12] builtin/rerere: drop `the_repository` Patrick Steinhardt
2026-11-06 15:13 ` [PATCH v3 04/12] builtin/rerere: stop passing flags to subcommands that ignore them Patrick Steinhardt
2026-11-06 15:13 ` [PATCH v3 05/12] builtin/rerere: turn "forget" into a proper subcommand Patrick Steinhardt
2026-11-06 15:14 ` [PATCH v3 06/12] builtin/rerere: turn "clear" " Patrick Steinhardt
2026-11-06 15:14 ` [PATCH v3 07/12] builtin/rerere: turn "status" " Patrick Steinhardt
2026-11-06 15:14 ` [PATCH v3 08/12] builtin/rerere: turn "remaining" " Patrick Steinhardt
2026-11-06 15:14 ` [PATCH v3 09/12] builtin/rerere: turn "diff" " Patrick Steinhardt
2026-11-06 15:14 ` [PATCH v3 10/12] builtin/rerere: turn "gc" " Patrick Steinhardt
2026-11-06 15:14 ` [PATCH v3 11/12] builtin/rerere: use `OPT_SUBCOMMAND()` Patrick Steinhardt
2026-11-06 15:14 ` [PATCH v3 12/12] builtin/rerere: introduce proper usage strings for subcommands Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 00/12] builtin/rerere: convert to use subcommands Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 01/12] rerere: rename `repo_rerere()` Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 02/12] rerere: convert flags into an enum Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 03/12] builtin/rerere: drop `the_repository` Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 04/12] builtin/rerere: stop passing flags to subcommands that ignore them Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 05/12] builtin/rerere: turn "forget" into a proper subcommand Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 06/12] builtin/rerere: turn "clear" " Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 07/12] builtin/rerere: turn "status" " Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 08/12] builtin/rerere: turn "remaining" " Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 09/12] builtin/rerere: turn "diff" " Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 10/12] builtin/rerere: turn "gc" " Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 11/12] builtin/rerere: use `OPT_SUBCOMMAND()` Patrick Steinhardt
2026-11-11 12:18 ` [PATCH v4 12/12] builtin/rerere: introduce proper usage strings for subcommands Patrick Steinhardt
2026-11-12 13:41 ` [PATCH v4 00/12] builtin/rerere: convert to use subcommands Karthik Nayak
2026-11-13 7:20 ` Patrick Steinhardt [this message]
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=ava6Q1u65ASVeth5@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=karthik.188@gmail.com \
--cc=markchucarroll@fastmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.