git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Len Brown <len.brown@intel.com>
To: Junio C Hamano <junkio@cox.net>
Cc: tony.luck@intel.com, Linus Torvalds <torvalds@osdl.org>,
	git@vger.kernel.org
Subject: Re: Automatic merge failed, fix up by hand
Date: Tue, 23 Aug 2005 22:25:27 -0400	[thread overview]
Message-ID: <1124850327.27033.6.camel@firebird.lenb.worldpath.net> (raw)
In-Reply-To: <7v3bp0m9ax.fsf@assigned-by-dhcp.cox.net>

On Tue, 2005-08-23 at 21:07 -0400, Junio C Hamano wrote:
> Junio C Hamano <junkio@cox.net> writes:
> 
> > Probably the ideal way would be to give merge-base an option to
> > spit out all the candidates, and have the script try to see
> > which ones yield the least number of non-trivial merges.
> 
> I first checked out your 702c7e.. commit, and slurped Linus tip
> (back then, 81065e2f415af6c028eac13f481fb9e60a0b487b).  Then I
> ran git resolve with the attached patch (against the tip of
> git.git "master" branch).  Here is what happened, which seems to
> work a little bit better, at least to me.
> 
>     prompt$ git checkout -f
>     prompt$ git status
>     nothing to commit
>     prompt$ ls -l .git/HEAD
>     lrwxrwxrwx  1 junio src 26 Aug 23 15:43 .git/HEAD ->
> refs/heads/lenb
>     prompt$ git resolve HEAD origin 'Merge Linus into Lenb'
>     Trying to find the optimum merge base
>     Trying to merge 81065e2f415af6c028eac13f481fb9e60a0b487b into
> 702c7e7626deeabb057b6f529167b65ec2eefbdb using
> 3edea4833a1efcd43e1dff082bc8001fdfe74b34

Looking at gitk, it certainly chose the right ancestor in this case.

>     Simple merge failed, trying Automatic merge
>     Auto-merging Documentation/acpi-hotkey.txt.
>     merge: warning: conflicts during merge
>     ERROR: Merge conflict in Documentation/acpi-hotkey.txt.
>     Auto-merging drivers/acpi/osl.c.
>     fatal: merge program failed
>     Automatic merge failed, fix up by hand
> 
> Only lightly tested, in the sense that I did only this one case
> and nothing else.  For a large repository and with complex
> merges, "merge-base -a" _might_ end up reporting many
> candidates, in which case the pre-merge step to figure out the
> best merge base may turn out to be disastrously slow.  I dunno.

It ran a heck of a lot faster than the alternative -- which
would have been to export 85 patches and re-commit them
to a new tree.

Perhaps Tony's recent merge mystery had the same cause and he can also
benefit from this patch?

thanks!

-Len

  parent reply	other threads:[~2005-08-24  2:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-23 21:12 Automatic merge failed, fix up by hand Len Brown
2005-08-23 22:06 ` Junio C Hamano
2005-08-23 22:31   ` Len Brown
2005-08-23 23:58     ` Junio C Hamano
2005-08-24  0:29       ` Junio C Hamano
2005-08-24  1:07         ` Junio C Hamano
2005-08-24  1:28           ` Linus Torvalds
2005-08-24  3:52             ` Junio C Hamano
2005-08-24  2:25           ` Len Brown [this message]
2005-08-24  3:11           ` Daniel Barkalow
2005-08-24  0:31       ` Len Brown
2005-08-24  0:48 ` 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=1124850327.27033.6.camel@firebird.lenb.worldpath.net \
    --to=len.brown@intel.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=tony.luck@intel.com \
    --cc=torvalds@osdl.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).