git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Wang, Lei" <lei4.wang@intel.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: [Question]: Question about "cherry-pick" internal
Date: Thu, 4 Aug 2022 09:25:02 +0800	[thread overview]
Message-ID: <e564b1e3-0f34-dce3-400d-439a40ec4d48@intel.com> (raw)

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


             reply	other threads:[~2022-08-04  1:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04  1:25 Wang, Lei [this message]
2022-08-07 16:48 ` [Question]: Question about "cherry-pick" internal Chris Torek
2022-08-08  3:27   ` Wang, Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e564b1e3-0f34-dce3-400d-439a40ec4d48@intel.com \
    --to=lei4.wang@intel.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).