Re: [PATCH 1/3] doc: merge-tree: provide a commit message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 7, 2024 at 4:11 AM Kristoffer Haugsbakk
<code@xxxxxxxxxxxxxxx> wrote:
>
> From: Kristoffer Haugsbakk <kristofferhaugsbakk@xxxxxxxxxxxx>
>
> From: Kristoffer Haugsbakk <code@xxxxxxxxxxxxxxx>
>
> Provide a commit message in the example command.
>
> The command will hang since it is waiting for a commit message on
> stdin.  Which is usable but not straightforward enough since this is
> example code.

This is fine, but...

>
> Signed-off-by: Kristoffer Haugsbakk <code@xxxxxxxxxxxxxxx>
> ---
>
> Notes (series):
>     Unlike on some other manuals you probably won’t end up running these
>     commands directly to test things out.  But you might end up copying and
>     modifying it when playing around with the command.
>
>  Documentation/git-merge-tree.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/git-merge-tree.txt b/Documentation/git-merge-tree.txt
> index 84cb2edf6d0..590cbf5df79 100644
> --- a/Documentation/git-merge-tree.txt
> +++ b/Documentation/git-merge-tree.txt
> @@ -213,7 +213,7 @@ used as a part of a series of steps such as:
>
>         NEWTREE=$(git merge-tree --write-tree $BRANCH1 $BRANCH2)
>         test $? -eq 0 || die "There were conflicts..."
> -       NEWCOMMIT=$(git commit-tree $NEWTREE -p $BRANCH1 -p $BRANCH2)
> +       NEWCOMMIT=$(git commit-tree $NEWTREE -mMerge -p $BRANCH1 -p $BRANCH2)

...perhaps this can be -F ${FILE_WITH_COMMIT_MESSAGE} ?  I personally
have a problem with writing example code that models horrible commit
messages; I'd rather give them an example that hangs waiting on stdin
than do that.

>         git update-ref $BRANCH1 $NEWCOMMIT
>
>  Note that when the exit status is non-zero, `NEWTREE` in this sequence
> --
> 2.46.1.641.g54e7913fcb6





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux