]> git.ipfire.org Git - thirdparty/git.git/commitdiff
replay: improve --contained and add to doc
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Sat, 13 Dec 2025 13:46:57 +0000 (14:46 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 14 Dec 2025 06:56:02 +0000 (15:56 +0900)
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>
Documentation/git-replay.adoc
builtin/replay.c

index 6fbb527b9d87b9ab9c98b7e3aae867c65beeb8a0..1e2469b90341e2569c3a18261cdf360488a9b46c 100644 (file)
@@ -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:
 +
index 6606a2c94bc67168c2b43e86f24717eb408e6f38..9e5ad64cad66a61d261d7a3b52e8fb5a3bc90c02 100644 (file)
@@ -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)")),