Skip to content

Commit

Permalink
merge-tree: improve docs for --stdin
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
phillipwood committed Feb 16, 2025
1 parent bf1dc60 commit 4c41685
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Documentation/git-merge-tree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4c41685

Please sign in to comment.