git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 2/3] replay: improve --contained and add to doc

From
Kkristofferhaugsbakk@fastmail.com <kristofferhaugsbakk@fastmail.com>
Date
Dec 13, 2025, 13:46 UTC
Message-ID
<V2_doc_replay_--contained.131@msgid.xyz>
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
Previous: kristofferhaugsbakk@fastmail.comNext: kristofferhaugsbakk@fastmail.com
Message 22 of 28 in “doc: replay: improvements like "mention no output on conflicts"”
  1. 0/3 doc: replay: improvements like "mention no output on conflicts"kristofferhaugsbakk@fastmail.com, Dec 7, 2025
  2. 1/3 doc: replay: mention no output on conflictskristofferhaugsbakk@fastmail.com, Dec 7, 2025
  3. 2/3 doc: replay: document --containedkristofferhaugsbakk@fastmail.com, Dec 7, 2025
  4. 3/3 doc: replay: link section using markupkristofferhaugsbakk@fastmail.com, Dec 7, 2025
  5. Junio C HamanoDec 7, 2025
  6. Kristoffer HaugsbakkDec 8, 2025
  7. Junio C HamanoDec 8, 2025
  8. Kristoffer HaugsbakkDec 9, 2025
  9. Junio C HamanoDec 9, 2025
  10. Toon ClaesDec 8, 2025
  11. Kristoffer HaugsbakkDec 8, 2025
  12. Phillip WoodDec 8, 2025
  13. Kristoffer HaugsbakkDec 9, 2025
  14. Junio C HamanoDec 9, 2025
  15. Phillip WoodDec 10, 2025
  16. Junio C HamanoDec 10, 2025
  17. Kristoffer HaugsbakkDec 10, 2025
  18. Phillip WoodDec 10, 2025
  19. Elijah NewrenDec 10, 2025
  20. 0/3 doc: replay: improvements like "mention no output on conflicts"kristofferhaugsbakk@fastmail.com, Dec 13, 2025
  21. 1/3 doc: replay: mention no output on conflictskristofferhaugsbakk@fastmail.com, Dec 13, 2025
  22. 2/3 replay: improve --contained and add to dockristofferhaugsbakk@fastmail.com, Dec 13, 2025
  23. 3/3 doc: replay: link section using markupkristofferhaugsbakk@fastmail.com, Dec 13, 2025
  24. Phillip WoodDec 15, 2025
  25. Kristoffer HaugsbakkDec 15, 2025
  26. Junio C HamanoDec 16, 2025
  27. Phillip WoodDec 16, 2025
  28. Kristoffer HaugsbakkDec 20, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.