Re: [PATCH 1/3] doc: merge-tree: provide a commit message
- From
Elijah Newren <newren@gmail.com>
- Date
- Oct 7, 2024, 15:17 UTC
- Message-ID
- <CABPp-BHoYSmxCDDXhC8MGxGV+wzaNc96Fbv60JAbhgX9O_x7oQ@mail.gmail.com>
- In-Reply-To
- <fef203471f4492af1468a0c91088324c394effd5.1728298931.git.code@khaugsbakk.name>
On Mon, Oct 7, 2024 at 4:11 AM Kristoffer Haugsbakk <code@khaugsbakk.name> wrote:
Show 10 quoted lines
> > From: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> > > From: Kristoffer Haugsbakk <code@khaugsbakk.name> > > 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...
Show 22 quoted lines
> > Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> > --- > > 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.
Show 5 quoted lines
> git update-ref $BRANCH1 $NEWCOMMIT > > Note that when the exit status is non-zero, `NEWTREE` in this sequence > -- > 2.46.1.641.g54e7913fcb6