git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: David Brown <git@davidb.org>
Cc: git@vger.kernel.org
Subject: Re: Cherry picking instead of merges.
Date: Thu, 3 Jul 2008 17:39:44 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0807031735330.2815@woody.linux-foundation.org> (raw)
In-Reply-To: <20080703223949.GA23092@old.davidb.org>



On Thu, 3 Jul 2008, David Brown wrote:
> 
> I'm still not clear how the one-commit-at-a-time resolution gets recorded
> anywhere (except in the cherry-picking branch).

For merges, the _only_ thing that matters from a "resolution" standpoint 
is that the history joins together. And it doesn't matter if it joins 
together fifty times or once - only the last point is relevant, since that 
becomes the last point of shared state.

> It seems to be that I would need to do multiple merges, one at each point
> where there is a conflict that I had to resolved.  I would remember this as
> I did each cherry picked change, but after the fact, I would have to
> compare the cherry picked change with the one it came from, and figure out
> where conflicts had to be resolved.

No, because you simply don't care. You only care about the final result. 
With a single merge, there is only a single merge-point, and a single 
result. The advantage of doing the cherry-pick is just that it splits the 
decision on how to merge up into many smaller decisions (that is often the 
_dis_advantage of cherry-picking too - it often makes for more work, even 
if the individual work may be simpler).

But once you've done all the small cherry-pick decisions, you'd only make 
one final merge that takes that final result as-is. Any future work will 
then know about the fact that you have a new common base point.

		Linus

      parent reply	other threads:[~2008-07-04  0:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03 18:26 Cherry picking instead of merges David Brown
2008-07-03 20:13 ` Alex Riesen
2008-07-03 20:15 ` Avery Pennarun
2008-07-03 20:53   ` David Brown
2008-07-03 21:18     ` Samuel Tardieu
2008-07-03 21:18 ` Linus Torvalds
2008-07-03 22:39   ` David Brown
2008-07-04  0:10     ` Björn Steinbrink
2008-07-04  4:40       ` David Brown
2008-07-04  5:30         ` Linus Torvalds
2008-07-04  6:36           ` Johannes Sixt
2008-07-04 16:47             ` Linus Torvalds
2008-07-04  0:39     ` Linus Torvalds [this message]

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

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

  git send-email \
    --in-reply-to=alpine.LFD.1.10.0807031735330.2815@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@davidb.org \
    --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.
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).