# git cherry could honour "cherry-picked from commit" messages?

2 messages from 2013-10-07 to 2013-10-07. Participants: Adam Spiers.
Thread: https://gitlist.dev/t/35079

## Adam Spiers, 2013-10-07 20:16

Subject: git cherry could honour "cherry-picked from commit" messages?
Message-ID: <20131007201617.GC31277@pacific.linksys.moosehall>
URL: https://gitlist.dev/e/20131007201617.GC31277%40pacific.linksys.moosehall

```
Currently git cherry determines whether a commit has been merged
upstream by calculating its patch-id and looking for that in the
upstream branch.  Is there any reason why it couldn't also look for
"(cherry picked from commit ...)" lines which are automatically added
by cherry-pick's -x switch?  This would combat the blind spot in
cherry's current approach concerning the case where the patch-id is
changed by the cherry-picking process (e.g. when the diff context
changes).

Most likely there would be good reasons to make such behaviour
optional (e.g. via git-config), but it seems like a waste for cherry
to complete ignore these lines which provide useful information.

Thanks,
Adam

```

## Adam Spiers, 2013-10-07 20:20

Subject: Re: git cherry could honour "cherry-picked from commit" messages?
Message-ID: <20131007202042.GD31277@pacific.linksys.moosehall>
URL: https://gitlist.dev/e/20131007202042.GD31277%40pacific.linksys.moosehall
In-Reply-To: <20131007201617.GC31277@pacific.linksys.moosehall>

```
On Mon, Oct 07, 2013 at 09:16:17PM +0100, Adam Spiers wrote:
> Currently git cherry determines whether a commit has been merged
> upstream by calculating its patch-id and looking for that in the
> upstream branch.  Is there any reason why it couldn't also look for
> "(cherry picked from commit ...)" lines which are automatically added
> by cherry-pick's -x switch?  This would combat the blind spot in
> cherry's current approach concerning the case where the patch-id is
> changed by the cherry-picking process (e.g. when the diff context
> changes).
> 
> Most likely there would be good reasons to make such behaviour
> optional (e.g. via git-config), but it seems like a waste for cherry
> to complete ignore these lines which provide useful information.

Also, whether or not this approach works, it would also be useful to
introduce a config option for cherry-pick so that it adds the "(cherry
picked from commit ...)" lines by default.  When introducing this
config option, another command-line switch would be required to allow
users to negate it.

```
