All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: Howard Miller <howard@e-learndesign.co.uk>, git@vger.kernel.org
Subject: Re: Commited to wrong branch
Date: Wed, 16 Sep 2009 00:30:25 +0200	[thread overview]
Message-ID: <20090915223025.GB14652@atjola.homenet> (raw)
In-Reply-To: <46a038f90909151453u5ead2eb5nebb46930a8e7277@mail.gmail.com>

On 2009.09.15 23:53:03 +0200, Martin Langhoff wrote:
> 2009/9/15 Björn Steinbrink <B.Steinbrink@gmx.de>:
> > Sooner or later you'll hit a merge conflict anyway, and conflict markers
> > aren't that hard to understand, and IMHO are easier to handle than .rej
> > files, as you get to edit everything in-place.
> 
> When git's diff3 gets confused trying to use ancestry, the conflict
> markers bring completely unrelated things that belong to the history
> of the file and not to the patch at hand.
> 
> It's not about the conflict markers but somewhat nonsensical proposed
> "sides" to the resolution.

That's not git getting confused trying to use the ancestry, but git
being unable to make use of the history. It has to use a fake common
ancestor, as using the true common ancestor would obviously mean that
you do a real merge, not a cherry-pick. Under some circumstances that
can lead to quite "interesting" conflicts, yeah, but IMHO still better
to deal with than those .rej files, especially when you switch to diff3
conflict marker mode (git checkout --conflict=diff3 -- file), which also
contains the version of the code that the "common ancestor" has.

> > Well, you likely shouldn't be using git-apply, which is plumbing, and
> > can't easily make use of the "index" information in git patches to do a
> > three-way merge instead of a "stupid" patch application. Instead use
> > git-am --3way to make git perform a three-way merge, leading to
> > conflicts instead of plain patch rejection.
> 
> Um, you got your internals wrong. git-apply is what git-am uses.

No, you didn't understand what I said. I said that _you_ shouldn't be
using git-apply. That "git am" internally uses "git apply" is a totally
different story. And with --3way, it doesn't even run just "git apply <
patch", but uses "git apply" just to build a fake common ancestor and
does a 3-way merge with git-merge-recursive.

Björn

  reply	other threads:[~2009-09-15 22:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 10:31 Commited to wrong branch Howard Miller
2009-09-15 10:55 ` Martin Langhoff
2009-09-15 11:05   ` Howard Miller
2009-09-15 11:16     ` Martin Langhoff
2009-09-15 12:10       ` Howard Miller
2009-09-15 12:46         ` Martin Langhoff
2009-09-15 12:58           ` Howard Miller
2009-09-15 13:06             ` Björn Steinbrink
2009-09-15 13:12               ` Howard Miller
2009-09-15 13:54               ` Martin Langhoff
2009-09-15 14:11                 ` Howard Miller
2009-09-15 20:39                 ` Björn Steinbrink
2009-09-15 20:52                   ` Howard Miller
2009-09-15 21:53                   ` Martin Langhoff
2009-09-15 22:30                     ` Björn Steinbrink [this message]
2009-09-15 13:27             ` Howard Miller
2009-09-15 13:45               ` Howard Miller
2009-09-15 14:08                 ` Johannes Sixt
2009-09-15 13:46               ` Martin Langhoff
2009-09-15 11:19   ` Björn Steinbrink

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=20090915223025.GB14652@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=howard@e-learndesign.co.uk \
    --cc=martin.langhoff@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.