git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: adr3nald0s@gmail.com
Cc: Daniel Barkalow <barkalow@iabervon.org>, git@vger.kernel.org
Subject: Re: Anomalous conflicts during git rebase
Date: Fri, 28 Dec 2007 19:54:49 +0100	[thread overview]
Message-ID: <20071228185449.GA30574@atjola.homenet> (raw)
In-Reply-To: <m3fxxm7jp6.fsf@euroclydon.lan>

On 2007.12.28 12:33:41 -0600, adr3nald0s@gmail.com wrote:
> Daniel Barkalow <barkalow@iabervon.org> writes:
> 
> > On Fri, 28 Dec 2007, adr3nald0s@gmail.com wrote:
> >
> >> When you say it linearizes history how is this done.
> >
> > Rebase takes a list of commits that are in the current branch and 
> > aren't in the origin branch as what it's going to work on; these are 
> > ordered in some arbitrary way such that children always follow parents. It 
> > then resets to the origin branch's commit, and, in sequence, cherry-picks 
> > each of the commits in the working list.
> 
> Thanks again for the clear explanation.
> 
> > In theory, of course, it could try to resolve conflicts by looking through 
> > the rest of the list for merges which would have those conflicts and using 
> > what that merge did.  
> 
> Given the implementation, this would be just plain ugly.  I would not
> want to attempt to implement something like this, nor would I expect
> anyone else to do so.

I wouldn't make sense either. The conflict resolution that was done in
the merge commit might need stuff from commits that haven't been rebased
yet. For example a new function that was introduced later, it was
available for the merge, but is still missing from the rebased linear
history.

That said, what _might_ make sense is to teach interactive rebase with
-p to use "cherry-pick -m1" or whatever instead of "merge" to recreate
the merge commits (or maybe it does that already now? didn't check...).
That way, it wouldn't have to rely on rerere being enabled to avoid the
repeated resolving of the merge conflicts. I'm not sure how that would
need to interact with new changes introduces into one of the rewritten
branches.

Björn

      reply	other threads:[~2007-12-28 18:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-27 22:42 Anomalous conflicts during git rebase adr3nald0s
2007-12-27 22:57 ` Johannes Sixt
2007-12-28 15:35   ` adr3nald0s
2007-12-27 23:45 ` Daniel Barkalow
2007-12-28 15:54   ` adr3nald0s
2007-12-28 17:58     ` Daniel Barkalow
2007-12-28 18:33       ` adr3nald0s
2007-12-28 18:54         ` Björn Steinbrink [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=20071228185449.GA30574@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=adr3nald0s@gmail.com \
    --cc=barkalow@iabervon.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).