Re: [PATCH v2 2/3] cherry-pick/revert: add scissors line on merge conflict
- Date: Thu, 7 Mar 2019 01:19:03 -0800
- From: Denton Liu <liu.denton@xxxxxxxxx>
- Subject: Re: [PATCH v2 2/3] cherry-pick/revert: add scissors line on merge conflict
On Thu, Mar 07, 2019 at 04:52:57PM +0900, Junio C Hamano wrote:
> Denton Liu <liu.denton@xxxxxxxxx> writes:
> > diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
> > index d35d771fc8..5c086d78c8 100644
> > diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt
> > index 837707a8fd..1894010e60 100644
> > --- a/Documentation/git-revert.txt
> > +++ b/Documentation/git-revert.txt
> > @@ -66,6 +66,13 @@ more details.
> > With this option, 'git revert' will not start the commit
> > message editor.
> > +--cleanup=<mode>::
> > + This option determines how the commit message will be cleaned up before
> > + being passed on. See linkgit:git-commit for more details. In
> > + addition, if the '<mode>' is given a value of `scissors`, scissors will
> > + be prepended to MERGE_MSG before being passed on in the case of a
> > + conflict.
> These both say "prepended", but shouldn't the code
> - add the merge message proper, with the expectation that it would
> be used more or less intact in the final commit message; then
> - add the scissors; then
> - append informative cruft that would be removed, only to help
> human users.
> in this order? I'd expect that most people would consider that the
> primary payload of MERGE_MSG file is the part that would become the
> commit message, so I would have expected the second step would be
> described as "appended to".
I copied this over from 6f06b6aeef (merge: add scissors line on merge
conflict, 2019-01-22). I guess I'll have to fix it up in git-merge too.
> Another thing I notice is that this singles out "scissors" mode;
> doesn't the code do anything worth describing with other clean-up
The revert/cherry-pick code doesn't really do anything with the cleanup
mode. It's only used to determine whether to generate the scissors line
in the case of a conflict.