[Question]: Question about "cherry-pick" internal
- From
- Wang, Lei <lei4.wang@intel.com>
- Date
- Aug 4, 2022, 01:25 UTC
- Message-ID
- <e564b1e3-0f34-dce3-400d-439a40ec4d48@intel.com>
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