git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Question]: Question about "cherry-pick" internal
@ 2022-08-04  1:25 Wang, Lei
  2022-08-07 16:48 ` Chris Torek
  0 siblings, 1 reply; 3+ messages in thread
From: Wang, Lei @ 2022-08-04  1:25 UTC (permalink / raw)
  To: git@vger.kernel.org

Hi,

I heard that cherry-pick is just a kind of merge, the difference between 
it and the traditional merge is that it treats the parent commit of the 
commit you want to cherry-pick as the merge-base, then it will diff both 
the current branch with the parent and the commit you want to 
cherry-pick with the parent to generate 2 diffs, then it will try to 
apply these 2 diffs to the parent commit. If the diff modified the same 
line, then a conflict occurs.

If the above is true, but why when I cherry-picked a commit, a conflict 
occurs even the 2 diffs didn't modify the same line, they modified the 
two consecutive lines (line n and line n + 1), so what can be the 
potential reason for this?

Looking forward to your valuable comments!

-- 
BR,
Lei


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-08  3:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-04  1:25 [Question]: Question about "cherry-pick" internal Wang, Lei
2022-08-07 16:48 ` Chris Torek
2022-08-08  3:27   ` Wang, Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).