From: kristofferhaugsbakk@fastmail.com
To: Junio C Hamano <gitster@pobox.com>
Cc: Kristoffer Haugsbakk <code@khaugsbakk.name>,
git@vger.kernel.org, Phillip Wood <phillip.wood@dunelm.org.uk>,
christian.couder@gmail.com, newren@gmail.com,
Siddharth Asthana <siddharthasthana31@gmail.com>
Subject: [PATCH v2 2/3] replay: improve --contained and add to doc
Date: Sat, 13 Dec 2025 14:46:57 +0100 [thread overview]
Message-ID: <V2_doc_replay_--contained.131@msgid.xyz> (raw)
In-Reply-To: <V2_CV_replay_conflict.12f@msgid.xyz>
From: Kristoffer Haugsbakk <code@khaugsbakk.name>
There is no documentation for `--contained`.
Start by copying the text from `replay_options` in `builtin/
replay.c`. But some people think that the existing text is a
bit unclear; what does it mean for a branch to be contained
in a revision range? Let’s include the implied commits here:
the branches that point at commits in the range.
Also use “update” instead of “advance”. “Update” is the verb
commonly used in this context.
Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
Notes (series):
v2:
Don’t just copy `--contained` over. Improve it on both sites after discussing
with reviewers.
Also mention that `--onto` is required.
Documentation/git-replay.adoc | 4 ++++
builtin/replay.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-replay.adoc b/Documentation/git-replay.adoc
index 6fbb527b9d8..1e2469b9034 100644
--- a/Documentation/git-replay.adoc
+++ b/Documentation/git-replay.adoc
@@ -42,6 +42,10 @@ The history is replayed on top of the <branch> and <branch> is updated to
point at the tip of the resulting history. This is different from `--onto`,
which uses the target only as a starting point without updating it.
+--contained::
+ Update all branches that point at commits in
+ <revision-range>. Requires `--onto`.
+
--ref-action[=<mode>]::
Control how references are updated. The mode can be:
+
diff --git a/builtin/replay.c b/builtin/replay.c
index 6606a2c94bc..9e5ad64cad6 100644
--- a/builtin/replay.c
+++ b/builtin/replay.c
@@ -377,7 +377,7 @@ int cmd_replay(int argc,
N_("revision"),
N_("replay onto given commit")),
OPT_BOOL(0, "contained", &contained,
- N_("advance all branches contained in revision-range")),
+ N_("update all branches that point at commits in <revision-range>")),
OPT_STRING(0, "ref-action", &ref_action,
N_("mode"),
N_("control ref update behavior (update|print)")),
--
2.52.0.10.g08704017180
next prev parent reply other threads:[~2025-12-13 13:48 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-07 17:55 [PATCH 0/3] doc: replay: improvements like "mention no output on conflicts" kristofferhaugsbakk
2025-12-07 17:55 ` [PATCH 1/3] doc: replay: mention no output on conflicts kristofferhaugsbakk
2025-12-07 17:55 ` [PATCH 2/3] doc: replay: document --contained kristofferhaugsbakk
2025-12-07 17:55 ` [PATCH 3/3] doc: replay: link section using markup kristofferhaugsbakk
2025-12-07 21:58 ` [PATCH 0/3] doc: replay: improvements like "mention no output on conflicts" Junio C Hamano
2025-12-08 7:28 ` Kristoffer Haugsbakk
2025-12-08 12:41 ` Junio C Hamano
2025-12-09 18:05 ` Kristoffer Haugsbakk
2025-12-09 23:02 ` Junio C Hamano
2025-12-08 14:29 ` Toon Claes
2025-12-08 14:35 ` Kristoffer Haugsbakk
2025-12-08 16:00 ` Phillip Wood
2025-12-09 18:03 ` Kristoffer Haugsbakk
2025-12-09 22:57 ` Junio C Hamano
2025-12-10 9:51 ` Phillip Wood
2025-12-10 11:56 ` Junio C Hamano
2025-12-10 12:04 ` Kristoffer Haugsbakk
2025-12-10 14:14 ` Phillip Wood
2025-12-10 15:40 ` Elijah Newren
2025-12-13 13:46 ` [PATCH v2 " kristofferhaugsbakk
2025-12-13 13:46 ` [PATCH v2 1/3] doc: replay: mention no output on conflicts kristofferhaugsbakk
2025-12-13 13:46 ` kristofferhaugsbakk [this message]
2025-12-13 13:46 ` [PATCH v2 3/3] doc: replay: link section using markup kristofferhaugsbakk
2025-12-15 10:13 ` [PATCH v2 0/3] doc: replay: improvements like "mention no output on conflicts" Phillip Wood
2025-12-15 11:59 ` Kristoffer Haugsbakk
2025-12-16 0:29 ` Junio C Hamano
2025-12-16 14:25 ` Phillip Wood
2025-12-20 19:34 ` Kristoffer Haugsbakk
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=V2_doc_replay_--contained.131@msgid.xyz \
--to=kristofferhaugsbakk@fastmail.com \
--cc=christian.couder@gmail.com \
--cc=code@khaugsbakk.name \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=siddharthasthana31@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;
as well as URLs for NNTP newsgroup(s).