git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 2/3] cherry-pick/revert: add scissors line on merge conflict

From
Denton Liu <liu.denton@gmail.com>
Date
Mar 7, 2019, 09:19 UTC
Message-ID
<20190307091903.GA7970@archbookpro.localdomain>
In-Reply-To
<xmqqa7i7m886.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Thu, Mar 07, 2019 at 04:52:57PM +0900, Junio C Hamano wrote:
Show 32 quoted lines
> Denton Liu <liu.denton@gmail.com> 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[1] 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
> modes?

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.

Previous: Junio C HamanoNext: Denton Liu
Message 12 of 25 in “cherry-pick/revert cleanup scissors fix”
  1. 0/2 cherry-pick/revert cleanup scissors fixDenton Liu, Mar 6, 2019
  2. 1/2 t3507: cleanup space after redirection operatorsDenton Liu, Mar 6, 2019
  3. 2/2 cherry-pick/revert: add scissors line on merge conflictDenton Liu, Mar 6, 2019
  4. Phillip WoodMar 6, 2019
  5. Denton LiuMar 7, 2019
  6. Denton LiuMar 7, 2019
  7. 0/3 cherry-pick/revert cleanup scissors fixDenton Liu, Mar 7, 2019
  8. 1/3 t3507: cleanup space after redirection operatorsDenton Liu, Mar 7, 2019
  9. Junio C HamanoMar 7, 2019
  10. 2/3 cherry-pick/revert: add scissors line on merge conflictDenton Liu, Mar 7, 2019
  11. Junio C HamanoMar 7, 2019
  12. Denton LiuMar 7, 2019
  13. 3/3 sequencer.c: don't die on invalid cleanup_argDenton Liu, Mar 7, 2019
  14. Junio C HamanoMar 7, 2019
  15. 0/4 cherry-pick/revert cleanup scissors fixDenton Liu, Mar 7, 2019
  16. 1/4 merge-options.txt: correct typoDenton Liu, Mar 7, 2019
  17. Junio C HamanoMar 8, 2019
  18. 2/4 t3507: cleanup space after redirection operatorsDenton Liu, Mar 7, 2019
  19. 3/4 cherry-pick/revert: add scissors line on merge conflictDenton Liu, Mar 7, 2019
  20. Phillip WoodMar 7, 2019
  21. Denton LiuMar 7, 2019
  22. Phillip WoodMar 7, 2019
  23. Junio C HamanoMar 8, 2019
  24. 4/4 sequencer.c: don't die on invalid cleanup_argDenton Liu, Mar 7, 2019
  25. Phillip WoodMar 7, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.