Automatic merge failed, fix up by hand
I'm having trouble using git for merging kernel trees. git seems to manufacture conflicts in files that I never touched, and on some files it completely throws up its arms, see "Not handling case" below. Not clear how I got into this state -- probably something to do with adding commits on branches and them git-pull-branch'ing them into the master; combined with updating the master from-linus. when i switch heads, I simply remove .git/HEAD and link it to the refs/heads/master or refs/heads/acpi-2.6.12 followed by a git checkout -f. To merge the work back into the master I switch back to the master and git-pull-branch per jeff's howto. I also periodically pull from-linus after switching the branch back to the master. The merge issue below is reproduced in a "git clone -l" copy with no plain files present. Got any tips on how to recover? thanks, -Len [EMAIL PROTECTED] to-akpm.latest]$ git pull ../../from-linus Packing 842 objects Unpacking 842 objects 100% (842/842) done Trying to merge 81065e2f415af6c028eac13f481fb9e60a0b487b into 702c7e7626deeabb057b6f529167b65ec2eefbdb Simple merge failed, trying Automatic merge Auto-merging CREDITS. Removing Documentation/DocBook/scsidrivers.tmpl Removing Documentation/dvb/README.dibusb Removing Documentation/i2c/chips/smsc47b397.txt Removing Documentation/i2c/sysfs-interface Removing Documentation/networking/wanpipe.txt Auto-merging MAINTAINERS. merge: warning: conflicts during merge ERROR: Merge conflict in MAINTAINERS. Removing arch/arm/configs/omnimeter_defconfig Removing arch/arm/kernel/arch.c Removing arch/arm/lib/longlong.h Removing arch/arm/lib/udivdi3.c Removing arch/arm/mach-omap/Kconfig Removing arch/arm/mach-omap/Makefile Removing arch/arm/mach-omap/Makefile.boot Removing arch/arm/mach-omap/board-generic.c Removing arch/arm/mach-omap/board-h2.c Removing arch/arm/mach-omap/board-h3.c Removing arch/arm/mach-omap/board-innovator.c Removing arch/arm/mach-omap/board-netstar.c Removing arch/arm/mach-omap/board-osk.c Removing arch/arm/mach-omap/board-perseus2.c Removing arch/arm/mach-omap/board-voiceblue.c Removing arch/arm/mach-omap/clock.c Removing arch/arm/mach-omap/clock.h Removing arch/arm/mach-omap/common.c Removing arch/arm/mach-omap/common.h Removing arch/arm/mach-omap/dma.c Removing arch/arm/mach-omap/fpga.c Removing arch/arm/mach-omap/gpio.c Removing arch/arm/mach-omap/irq.c Removing arch/arm/mach-omap/leds-h2p2-debug.c Removing arch/arm/mach-omap/leds-innovator.c Removing arch/arm/mach-omap/leds-osk.c Removing arch/arm/mach-omap/leds.c Removing arch/arm/mach-omap/leds.h Removing arch/arm/mach-omap/mcbsp.c Removing arch/arm/mach-omap/mux.c Removing arch/arm/mach-omap/ocpi.c Removing arch/arm/mach-omap/pm.c Removing arch/arm/mach-omap/sleep.S Removing arch/arm/mach-omap/time.c Removing arch/arm/mach-omap/usb.c Auto-merging arch/arm/mm/Kconfig. Auto-merging arch/arm/mm/proc-v6.S. Auto-merging arch/arm/nwfpe/softfloat.c. merge: warning: conflicts during merge ERROR: Merge conflict in arch/arm/nwfpe/softfloat.c. Auto-merging arch/i386/kernel/acpi/boot.c. merge: warning: conflicts during merge ERROR: Merge conflict in arch/i386/kernel/acpi/boot.c. Auto-merging arch/i386/kernel/acpi/sleep.c. merge: warning: conflicts during merge ERROR: Merge conflict in arch/i386/kernel/acpi/sleep.c. Auto-merging arch/i386/kernel/apic.c. Auto-merging arch/i386/kernel/nmi.c. Auto-merging arch/ia64/Kconfig. Auto-merging arch/ia64/configs/sn2_defconfig. merge: warning: conflicts during merge ERROR: Merge conflict in arch/ia64/configs/sn2_defconfig. Auto-merging arch/ia64/configs/tiger_defconfig. merge: warning: conflicts during merge ERROR: Merge conflict in arch/ia64/configs/tiger_defconfig. Auto-merging arch/ia64/configs/zx1_defconfig. merge: warning: conflicts during merge ERROR: Merge conflict in arch/ia64/configs/zx1_defconfig. Auto-merging arch/ia64/kernel/acpi.c. merge: warning: conflicts during merge ERROR: Merge conflict in arch/ia64/kernel/acpi.c. Auto-merging arch/ia64/kernel/domain.c. Auto-merging arch/ia64/kernel/iosapic.c. merge: warning: conflicts during merge ERROR: Merge conflict in arch/ia64/kernel/iosapic.c. Auto-merging arch/ia64/kernel/perfmon.c. Removing arch/ia64/sn/include/pci/pcibr_provider.h Removing arch/ia64/sn/include/pci/pic.h Removing arch/ia64/sn/include/pci/tiocp.h Auto-merging arch/ia64/sn/kernel/io_init.c. merge: warning: conflicts during merge ERROR: Merge conflict in arch/ia64/sn/kernel/io_init.c. Removing arch/mips/vr41xx/common/giu.c Removing arch/ppc/boot/utils/addSystemMap.c Removing arch/ppc/syslib/ppc4xx_kgdb.c Removing arch/ppc64/boot/mknote.c Removing arch/ppc64/boot/piggyback.c Auto-merging arch/ppc64/kernel/LparData.c. merge: warning: conflicts during merge ERROR: Merge conflict in arch/ppc64/kernel/LparData.c. Auto-merging arch/ppc64/kernel/Makefile. Removing arch/ppc64/kernel/XmPciLpEvent.c Auto-merging arch/ppc64/kernel/head.S. Removing arch/ppc64/kernel/iSeries_pci_reset.c Auto-merging arch/ppc64/kernel/iommu.c. Auto-mer
Re: Automatic merge failed, fix up by hand
On Tue, 2005-08-23 at 18:06 -0400, Junio C Hamano wrote: > Len Brown <[EMAIL PROTECTED]> writes: > > > The merge issue below is reproduced in a "git clone -l" copy > > with no plain files present. > > Meaning you did not have any file in the working tree? It seems > to me that what is happenning is the resolve is trying to merge > the head of your tree and from-linus, but at the same time it > notices that you removed those files from your working tree and > thinks that is what you would want to do. Doesn't matter if the merge is after a git checkout -f or not. I was just pointing out that it also fails if there are no plain files checked out. > I could get to 81065e2f415af6... commit (Linus tip at this > moment), so if you can tell me where to snarf the other commit > (702c7e76) that would help me diagnose the problem a lot. rsync://rsync.kernel.org/pub/scm/linux/kernel/git/lenb/to-akpm.git fails when merged into latest linus, or when latest linus is merged into it. I suspect some artifact of my patches being based on one of several branches rooted at 2.6.12 is the issue, and that in switching between latest 2.6.13 and stable 2.6.12 branches, some state has bled through that now confuses the heck out of resolve. thanks, -Len - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Automatic merge failed, fix up by hand
On Tue, 2005-08-23 at 19:58 -0400, Junio C Hamano wrote: > Len Brown <[EMAIL PROTECTED]> writes: > > >> I could get to 81065e2f415af6... commit (Linus tip at this > >> moment), so if you can tell me where to snarf the other commit > >> (702c7e76) that would help me diagnose the problem a lot. > > > > rsync://rsync.kernel.org/pub/scm/linux/kernel/git/lenb/to-akpm.git > > Thanks. > > I think merge-base, even though we attempted to fix it recently, > is still confused and that is one of the reasons why you are > getting this. > > prompt$ git-rev-parse origin test-lenb-merge > 81065e2f415af6c028eac13f481fb9e60a0b487b > 702c7e7626deeabb057b6f529167b65ec2eefbdb > prompt$ git-merge-base origin test-lenb-merge > 30e332f3307e9f7718490a706e5ce99f0d3a7b26 > prompt$ git show-branch origin test-lenb-merge > ! [origin] zd1201 kmalloc size fix > * [test-lenb-merge] [ACPI] fix ia64 build issues resulting from > L... > -- > + [origin] zd1201 kmalloc size fix > + [origin~1] md: make sure resync gets started when array starts. > + [origin~2] preempt race in getppid > + [origin~3] Merge master.kernel.org:/pub/scm/linux/kernel/git/da > -- >8 -- snip -- >8 -- > + Merge ../to-linus-stable/ > ++ [ACPI] re-enable platform-specific hotkey drivers by default > + ARM: 2851/1: Fix NWFPE extended precision exception handling > ++ [origin~34] intelfb/fbdev: Save info->flags in a local variable > prompt$ git-rev-parse origin~34 > 3edea4833a1efcd43e1dff082bc8001fdfe74b34 > > Notice that show-branch, which walks the commit ancestry chain > pretty much the same way merge-base does, notices and stops at > origin~34 (that's 34th generation first parent commit from Linus > tip) that is the common commit between the two heads being > merged? And that commit, 3edea48... is different from what > merge-base is reporting. > > If I maually run merge-cache using origin~34 as the merge base, > only the following two files needs to result in non-simple merge: > > Documentation/acpi-hotkey.txt > drivers/acpi/osl.c > > Do these two files match your expectation? No, I don't think so. Unless I missed something, to-akpm should be a proper super-set of from-linus, so I wouldn't expect a merge on these two. > I'll take a look at merge-base.c next, but just in case I CC:ed > this to Linus, who is more familiar with that code. thanks, -Len - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Automatic merge failed, fix up by hand
On Tue, 2005-08-23 at 21:07 -0400, Junio C Hamano wrote: > Junio C Hamano <[EMAIL PROTECTED]> 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 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html