git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Elijah Newren <newren@gmail.com>,
	Phillip Wood via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH 4/5] merge-tree: improve docs for --stdin
Date: Tue, 18 Feb 2025 10:02:27 +0000	[thread overview]
Message-ID: <1b6ba7c4-56e2-4892-93d3-d57c7193432d@gmail.com> (raw)
In-Reply-To: <CABPp-BG13wHuUKLZ6xAJn7z44HbNoO=4D71cY48vmBUnpfoiTg@mail.gmail.com>

Hi Elijah

On 17/02/2025 20:26, Elijah Newren wrote:
> On Sun, Feb 16, 2025 at 8:37 AM Phillip Wood via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
>>
>> Also correct the
>> merge status documentation for --stdin as if the status is less than
>> zero "git merge-tree" dies before printing it.
> 
> This also makes sense, but...die'ing still has an exit status
> associated with it right?

It does, but that is documented in a separate section which says that if 
there is an error it exits with a code that isn't 0 or 1. The section 
I've altered is documenting what "git merge-tree --stdin" prints to 
stdout and if result.clean is less than zero then it dies it does not 
print anything to stdout.

Best Wishes

Phillip

>> 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)
> 
> Should this line be kept but replace "<0" with "128" (the exit status of die)?
> 
>>
>>   [[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
> 


  reply	other threads:[~2025-02-18 10:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-16 16:37 [PATCH 0/5] merge-tree --stdin: flush stdout Phillip Wood via GitGitGadget
2025-02-16 16:37 ` [PATCH 1/5] merge-tree --stdin: flush stdout to avoid deadlock Phillip Wood via GitGitGadget
2025-02-17 20:01   ` Elijah Newren
2025-02-16 16:37 ` [PATCH 2/5] merge-tree: remove redundant code Phillip Wood via GitGitGadget
2025-02-17 20:15   ` Elijah Newren
2025-02-18 10:01     ` Phillip Wood
2025-02-16 16:37 ` [PATCH 3/5] merge-tree: only use basic merge config Phillip Wood via GitGitGadget
2025-02-16 16:37 ` [PATCH 4/5] merge-tree: improve docs for --stdin Phillip Wood via GitGitGadget
2025-02-17 20:26   ` Elijah Newren
2025-02-18 10:02     ` Phillip Wood [this message]
2025-02-18 15:56       ` Elijah Newren
2025-02-16 16:37 ` [PATCH 5/5] merge-tree: fix link formatting in html docs Phillip Wood via GitGitGadget
2025-02-17 20:30   ` Elijah Newren
2025-02-18 16:24 ` [PATCH v2 0/5] merge-tree --stdin: flush stdout Phillip Wood via GitGitGadget
2025-02-18 16:24   ` [PATCH v2 1/5] merge-tree --stdin: flush stdout to avoid deadlock Phillip Wood via GitGitGadget
2025-02-19  6:23     ` Patrick Steinhardt
2025-02-19 14:55       ` Phillip Wood
2025-02-19 16:02       ` Junio C Hamano
2025-02-18 16:24   ` [PATCH v2 2/5] merge-tree: remove redundant code Phillip Wood via GitGitGadget
2025-02-18 16:24   ` [PATCH v2 3/5] merge-tree: only use basic merge config Phillip Wood via GitGitGadget
2025-02-18 16:24   ` [PATCH v2 4/5] merge-tree: improve docs for --stdin Phillip Wood via GitGitGadget
2025-02-18 16:24   ` [PATCH v2 5/5] merge-tree: fix link formatting in html docs Phillip Wood via GitGitGadget
2025-02-18 16:46   ` [PATCH v2 0/5] merge-tree --stdin: flush stdout Elijah Newren
2025-02-18 16:54     ` Phillip Wood
2025-02-18 19:35     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b6ba7c4-56e2-4892-93d3-d57c7193432d@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=newren@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).