Re: [RFC] origin link for cherry-pick and revert
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Sep 11, 2008, 23:44 UTC
- Message-ID
- <alpine.LFD.1.10.0809111641110.3384@nehalem.linux-foundation.org>
- In-Reply-To
- <48C9A9A4.8090703@vilain.net>
On Fri, 12 Sep 2008, Sam Vilain wrote:
> > 2. make git-cherry-pick have a similar option to '-x', but instead of > recording the original commit ID, record the original *patch* ID, > *if* there was a merge conflict for that cherry pick.
Actually, don't make it dependent on merge conflicts. Just make it depend on whether the patch ID is _different_.
It can happen even without any conflicts, just because the context changed. So it really isn't about merge conflicts per se, just the fact that a patch can change when it is applied in a new area with a three-way diff - or because it got applied with fuzz.
You could add it as a
Original-patch-id: <sha1>
or something. And then you just need to teach "git cherry/rebase" to take both the original ID and the new one into account when deciding whether it has already seen that patch.
Linus