# cherry-pick -x formats the message incorrectly

4 messages from 2010-11-16 to 2010-11-16. Participants: Martin Svensson, Junio C Hamano, Jonathan Nieder.
Thread: https://gitlist.dev/t/25759

## Martin Svensson, 2010-11-16 09:14

Subject: cherry-pick -x formats the message incorrectly
Message-ID: <loom.20101116T100730-967@post.gmane.org>
URL: https://gitlist.dev/e/loom.20101116T100730-967%40post.gmane.org

```
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, 2010-11-16 19:20

Subject: Re: cherry-pick -x formats the message incorrectly
Message-ID: <7vpqu5gjmv.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vpqu5gjmv.fsf%40alter.siamese.dyndns.org
In-Reply-To: <loom.20101116T100730-967@post.gmane.org>

```
Martin Svensson <martin.k.svensson@netinsight.se> writes:

> 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, 2010-11-16 19:35

Subject: Re: cherry-pick -x formats the message incorrectly
Message-ID: <20101116193504.GB15828@burratino>
URL: https://gitlist.dev/e/20101116193504.GB15828%40burratino
In-Reply-To: <7vpqu5gjmv.fsf@alter.siamese.dyndns.org>

```
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).
>
> 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, 2010-11-16 21:34

Subject: Re: cherry-pick -x formats the message incorrectly
Message-ID: <20101116213400.GA28402@burratino>
URL: https://gitlist.dev/e/20101116213400.GA28402%40burratino
In-Reply-To: <20101116193504.GB15828@burratino>

```
Jonathan Nieder wrote:
> 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).
[...]
> 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.

```
