git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Automatic merge failed, fix up by hand

From
Len Brown <len.brown@intel.com>
Date
Aug 24, 2005, 02:25 UTC
Message-ID
<1124850327.27033.6.camel@firebird.lenb.worldpath.net>
In-Reply-To
<7v3bp0m9ax.fsf@assigned-by-dhcp.cox.net>
On Tue, 2005-08-23 at 21:07 -0400, Junio C Hamano wrote:
Show 23 quoted lines
> 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.
Show 13 quoted lines
>     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
Previous: Junio C HamanoNext: Daniel Barkalow
Message 9 of 12 in “Automatic merge failed, fix up by hand”
  1. Len BrownAug 23, 2005
  2. Junio C HamanoAug 23, 2005
  3. Len BrownAug 23, 2005
  4. Junio C HamanoAug 23, 2005
  5. Junio C HamanoAug 24, 2005
  6. Junio C HamanoAug 24, 2005
  7. Linus TorvaldsAug 24, 2005
  8. Junio C HamanoAug 24, 2005
  9. Len BrownAug 24, 2005
  10. Daniel BarkalowAug 24, 2005
  11. Len BrownAug 24, 2005
  12. Linus TorvaldsAug 24, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.