replay: improve --contained and add to doc
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kristoffer Haugsbakk committed
Dec 13, 2025 at 14:46 UTC
03d7c9c457ba68f28269dcd607b9026ea6c6c9c8
2 files changed
+5
-1
Documentation/git-replay.adoc
+4
@@ -42,6 +42,10 @@ The history is replayed on top of the <branch> and <branch> is updated to
42
point at the tip of the resulting history. This is different from `--onto`,
43
which uses the target only as a starting point without updating it.
44
45
+--contained::
46
+ Update all branches that point at commits in
47
+ <revision-range>. Requires `--onto`.
48
+
49
--ref-action[=<mode>]::
50
Control how references are updated. The mode can be:
51
+
builtin/replay.c
+1
-1
@@ -377,7 +377,7 @@ int cmd_replay(int argc,
377
N_("revision"),
378
N_("replay onto given commit")),
379
OPT_BOOL(0, "contained", &contained,
380
- N_("advance all branches contained in revision-range")),
380
+ N_("update all branches that point at commits in <revision-range>")),
381
OPT_STRING(0, "ref-action", &ref_action,
382
N_("mode"),
383
N_("control ref update behavior (update|print)")),