threads / discuss / 25759

cherry-pick -x formats the message incorrectly

Subject: cherry-pick -x formats the message incorrectly

## tl;dr

4 messages between Nov 16, 2010 and Nov 16, 2010.

replies: 3people: 3as markdown or json

Martin Svensson· Nov 16, 2010, 09:14 UTC · lore
Hello,

I have a problem with the commit message format for "cherry-pick -x": Given a commit with the message:

  foo

, i.e. with only a summary part, I do "git cherry-pick -x the_commit". The result is a new commit with message

  foo
  (cherry picked from commit eb42a6475d2c2e4fff7a1b626ce6e27eec21e886)

Now that's not good, because it is a two-line summary. In my opinion, the parentheses should _always_ end up in the detailed part. It should be:

  foo
  
  (cherry picked from commit eb42a6475d2c2e4fff7a1b626ce6e27eec21e886)
Am I right?
/Martin Svensson, SW Developer
Junio C Hamano· Nov 16, 2010, 19:20 UTC · re: Martin Svensson · lore

Re: cherry-pick -x formats the message incorrectly

Martin Svensson <martin.k.svensson@netinsight.se> writes:
Show 9 quoted lines
> Now that's not good, because it is a two-line summary. In my opinion, the
> parentheses should _always_ end up in the detailed part.
> It should be:
>
>   foo
>   
>   (cherry picked from commit eb42a6475d2c2e4fff7a1b626ce6e27eec21e886)
>
> Am I right?

I tend to agree (modulo s/summary/subject/ would be the wording I would have used).

This falls into "patches welcome" category, though. I do not think anybody sane is still using cherry-pick with -x option these days after http://thread.gmane.org/gmane.comp.version-control.git/28378

Jonathan Nieder· Nov 16, 2010, 19:35 UTC · re: Junio C Hamano · lore

Re: cherry-pick -x formats the message incorrectly

Junio C Hamano wrote:
> Martin Svensson <martin.k.svensson@netinsight.se> writes:
Show 14 quoted lines
>> It should be:
>>
>>   foo
>>   
>>   (cherry picked from commit eb42a6475d2c2e4fff7a1b626ce6e27eec21e886)
>>
>> Am I right?
>
> I tend to agree (modulo s/summary/subject/ would be the wording I would
> have used).
>
> This falls into "patches welcome" category, though.  I do not think
> anybody sane is still using cherry-pick with -x option these days after
> http://thread.gmane.org/gmane.comp.version-control.git/28378
Mm, I use it and do not agree; I think the rule should rather be:
 - if there is a Signed-off chain, quietly integrate into that (no added
   newline)
 - if there is not a Signed-off chain, add the extra newline.
Patch for a related issue in a few minutes.
Jonathan Nieder· Nov 16, 2010, 21:34 UTC · re: Jonathan Nieder · lore

Re: cherry-pick -x formats the message incorrectly

Jonathan Nieder wrote:
Show 13 quoted lines
> Junio C Hamano wrote:
>> Martin Svensson <martin.k.svensson@netinsight.se> writes:
>
>>> It should be:
>>>
>>>   foo
>>>   
>>>   (cherry picked from commit eb42a6475d2c2e4fff7a1b626ce6e27eec21e886)
>>>
>>> Am I right?
>>
>> I tend to agree (modulo s/summary/subject/ would be the wording I would
>> have used).
[...]
Show 6 quoted lines
> Mm, I use it and do not agree; I think the rule should rather be:
> 
>  - if there is a Signed-off chain, quietly integrate into that (no added
>    newline)
> 
>  - if there is not a Signed-off chain, add the extra newline.

Hmm, probably it is obvious, but I sent this reply to the wrong message. Sorry for the nonsense.

Martin, I do agree with you and would be happy to see cherry-pick -x respecting the

	One-line subject
	Possibly multi-line, detailed description.
	Signed-off-by: chain
format.

← back to recent threads