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

[PATCH v2 4/5] merge-tree: improve docs for --stdin

From
PGPhillip Wood via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 18, 2025, 16:24 UTC
Message-ID
<1645b0e747e9bd65147bb0bc4123cfa32ca68818.1739895879.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1862.v2.git.1739895879.gitgitgadget@gmail.com>
From: Phillip Wood <phillip.wood@dunelm.org.uk>

Add a section for --stdin in the list of options and document that it implies -z so readers know how to parse the output. Also correct the merge status documentation for --stdin as if the status is less than zero "git merge-tree" dies before printing it.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
---
 Documentation/git-merge-tree.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-merge-tree.txt b/Documentation/git-merge-tree.txt
index 0b6a8a19b1f..efb16b4f27d 100644
--- a/Documentation/git-merge-tree.txt
+++ b/Documentation/git-merge-tree.txt
@@ -40,6 +40,11 @@ After the merge completes, a new toplevel tree object is created.  See
 OPTIONS
 -------
 
+--stdin::
+	Read the commits to merge from the standard input rather than
+	the command-line. See <<INPUT,INPUT FORMAT>> below for more
+	information.  Implies `-z`.
+
 -z::
 	Do not quote filenames in the <Conflicted file info> section,
 	and end each filename with a NUL character rather than
@@ -116,8 +121,6 @@ This is an integer status followed by a NUL character.  The integer status is:
 
      0: merge had conflicts
      1: merge was clean
-     <0: something prevented the merge from running (e.g. access to repository
-	 objects denied by filesystem)
 
 [[OIDTLT]]
 OID of toplevel tree
@@ -235,6 +238,7 @@ with linkgit:git-merge[1]:
   * any messages that would have been printed to stdout (the
     <<IM,Informational messages>>)
 
+[[INPUT]]
 INPUT FORMAT
 ------------
 'git merge-tree --stdin' input format is fully text based. Each line
-- 
gitgitgadget
Previous: Phillip Wood via GitGitGadgetNext: Phillip Wood via GitGitGadget
Message 21 of 25 in “merge-tree --stdin: flush stdout”
  1. 0/5 merge-tree --stdin: flush stdoutPhillip Wood via GitGitGadget, Feb 16, 2025
  2. 2/5 merge-tree: remove redundant codePhillip Wood via GitGitGadget, Feb 16, 2025
  3. Elijah NewrenFeb 17, 2025
  4. Phillip WoodFeb 18, 2025
  5. 1/5 merge-tree --stdin: flush stdout to avoid deadlockPhillip Wood via GitGitGadget, Feb 16, 2025
  6. Elijah NewrenFeb 17, 2025
  7. 3/5 merge-tree: only use basic merge configPhillip Wood via GitGitGadget, Feb 16, 2025
  8. 4/5 merge-tree: improve docs for --stdinPhillip Wood via GitGitGadget, Feb 16, 2025
  9. Elijah NewrenFeb 17, 2025
  10. Phillip WoodFeb 18, 2025
  11. Elijah NewrenFeb 18, 2025
  12. 5/5 merge-tree: fix link formatting in html docsPhillip Wood via GitGitGadget, Feb 16, 2025
  13. Elijah NewrenFeb 17, 2025
  14. 0/5 merge-tree --stdin: flush stdoutPhillip Wood via GitGitGadget, Feb 18, 2025
  15. 1/5 merge-tree --stdin: flush stdout to avoid deadlockPhillip Wood via GitGitGadget, Feb 18, 2025
  16. Patrick SteinhardtFeb 19, 2025
  17. Phillip WoodFeb 19, 2025
  18. Junio C HamanoFeb 19, 2025
  19. 2/5 merge-tree: remove redundant codePhillip Wood via GitGitGadget, Feb 18, 2025
  20. 3/5 merge-tree: only use basic merge configPhillip Wood via GitGitGadget, Feb 18, 2025
  21. 4/5 merge-tree: improve docs for --stdinPhillip Wood via GitGitGadget, Feb 18, 2025
  22. 5/5 merge-tree: fix link formatting in html docsPhillip Wood via GitGitGadget, Feb 18, 2025
  23. Elijah NewrenFeb 18, 2025
  24. Phillip WoodFeb 18, 2025
  25. Junio C HamanoFeb 18, 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.