git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Vilain <sam@vilain.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: martin f krafft <madduck@madduck.net>,
	git discussion list <git@vger.kernel.org>
Subject: Re: inexplicable failure to merge recursively across cherry-picks
Date: Fri, 12 Oct 2007 10:51:17 +1300	[thread overview]
Message-ID: <470E9AD5.2090002@vilain.net> (raw)
In-Reply-To: <alpine.LFD.0.999.0710100808150.3838@woody.linux-foundation.org>

Linus Torvalds wrote:
> So git doesn't try to avoid conflicts per se: the merge strategies are 
> fundamentally pretty simple (rename detection and the whole "recursive 
> merge" thing may not be simple code, but the concepts are pretty 
> straightforward), and they handle all the really *obvious* cases, but at 
> the same time, I feel strongly that anything even half-way subtle should 
> not be left to the SCM - the SCM should show it and make it really easy 
> for the user to then fix it up.

This is true.  However I think there are some obvious places for
improvement that does look at the file history, when the regular
algorithm fails;

1. do a --cherry-pick rev-list on just the file being merged and see if
all the changes on one side disappear, in which case just take the result.

2. see if the files were identical at some point, in which case use a
new merge base for that file based on the changes since that revision.

I actually thought #2 was already the way recursive worked!

Sam.

  parent reply	other threads:[~2007-10-11 21:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-10  1:55 inexplicable failure to merge recursively across cherry-picks martin f krafft
2007-10-10  2:54 ` Linus Torvalds
2007-10-10 10:25   ` martin f krafft
2007-10-10 10:33     ` David Kastrup
2007-10-10 15:25     ` Linus Torvalds
2007-10-10 15:48       ` David Brown
2007-10-10 19:07         ` Miklos Vajna
2007-10-10 19:35           ` Linus Torvalds
2007-10-11  0:08         ` Miklos Vajna
2007-10-11 21:51       ` Sam Vilain [this message]
2007-10-11 22:33         ` Linus Torvalds

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=470E9AD5.2090002@vilain.net \
    --to=sam@vilain.net \
    --cc=git@vger.kernel.org \
    --cc=madduck@madduck.net \
    --cc=torvalds@linux-foundation.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).