{"thread":{"id":"2728","subject":"resolve (merge) problems","startedAt":"2005-12-01T23:18:44Z","lastAt":"2005-12-02T13:59:37Z","messageCount":11,"participants":["Luben Tuikov","Junio C Hamano","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"13076","messageId":"20051201231844.59450.qmail@web31801.mail.mud.yahoo.com","threadId":"2728","inReplyTo":null,"subject":"resolve (merge) problems","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2005-12-01T23:18:44Z","receivedAt":"2005-12-01T23:18:44Z","isPatch":false,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"Hi,\n\n$git resolve HEAD master \"merge linus' tree\"\nTrying to merge 5666c0947ede0432ba5148570aa66ffb9febff5b into\n32df3299405fb7054b76346899f3db2fa29150fb using 458af5439fe7ae7d95ca14106844e61f0795166c.\nSimple merge failed, trying Automatic merge\nRemoving arch/arm/configs/poodle_defconfig\nRemoving drivers/atm/atmdev_init.c\nfatal: merge program failed\nAutomatic merge failed, fix up by hand\n\nHow do I proceed from here?\n\nThe output from git-diff-index is:\n\n$git-diff-index --name-status HEAD\nM       Documentation/usb/error-codes.txt\nM       Makefile\nM       arch/arm/configs/corgi_defconfig\nU       arch/arm/configs/poodle_defconfig\nM       arch/arm/configs/spitz_defconfig\nM       arch/arm/kernel/head.S\nM       arch/arm/mach-pxa/Kconfig\nM       arch/arm/mach-realview/core.c\nM       arch/arm/mm/consistent.c\nM       arch/arm/tools/mach-types\nM       arch/frv/kernel/semaphore.c\nM       arch/frv/mb93090-mb00/pci-irq.c\nM       arch/frv/mm/init.c\nM       arch/frv/mm/pgalloc.c\nM       arch/i386/kernel/io_apic.c\nM       arch/i386/kernel/reboot.c\nM       arch/ia64/kernel/ia64_ksyms.c\nM       arch/ia64/kernel/kprobes.c\nM       arch/ia64/kernel/traps.c\nM       arch/m32r/kernel/io_mappi3.c\nM       arch/m32r/kernel/setup_mappi3.c\nM       arch/m32r/kernel/sys_m32r.c\nM       arch/powerpc/kernel/ppc_ksyms.c\nM       arch/powerpc/kernel/process.c\nM       arch/powerpc/kernel/prom_init.c\nM       arch/powerpc/kernel/vdso.c\nM       arch/ppc/kernel/ppc_ksyms.c\nM       arch/ppc/kernel/process.c\nM       arch/sparc/mm/generic.c\nM       arch/sparc64/mm/generic.c\nM       drivers/atm/Kconfig\nM       drivers/atm/Makefile\nA       drivers/atm/adummy.c\nU       drivers/atm/atmdev_init.c\nM       drivers/atm/atmtcp.c\nM       drivers/atm/lanai.c\nM       drivers/char/drm/drm_context.c\nM       drivers/char/mem.c\nM       drivers/cpufreq/cpufreq.c\nM       drivers/hwmon/w83792d.c\nM       drivers/md/md.c\nM       drivers/md/raid1.c\nM       drivers/md/raid10.c\nM       drivers/md/raid5.c\nM       drivers/md/raid6main.c\nM       drivers/media/video/Kconfig\nM       drivers/media/video/cx88/Kconfig\nM       drivers/media/video/cx88/Makefile\nM       drivers/media/video/saa7134/Kconfig\nM       drivers/media/video/saa7134/Makefile\nM       drivers/message/fusion/mptbase.c\nM       drivers/message/fusion/mptbase.h\nM       drivers/mmc/mmc.c\nM       drivers/mtd/chips/cfi_cmdset_0001.c\nM       drivers/mtd/chips/cfi_probe.c\nM       drivers/mtd/chips/sharp.c\nM       drivers/mtd/devices/block2mtd.c\nM       drivers/mtd/devices/ms02-nv.c\nM       drivers/mtd/ftl.c\nM       drivers/mtd/maps/Kconfig\nM       drivers/mtd/maps/Makefile\nM       drivers/mtd/maps/ixp4xx.c\nM       drivers/mtd/maps/nettel.c\nM       drivers/mtd/maps/pci.c\nM       drivers/mtd/maps/physmap.c\nM       drivers/mtd/maps/sc520cdp.c\nM       drivers/mtd/nand/nandsim.c\nM       drivers/mtd/rfd_ftl.c\nM       drivers/pcmcia/m32r_cfc.c\nM       drivers/scsi/megaraid.c\nM       drivers/serial/8250.c\nM       drivers/serial/8250_pci.c\nM       drivers/serial/serial_core.c\nM       drivers/serial/serial_cs.c\nM       drivers/usb/atm/cxacru.c\nM       drivers/usb/atm/usbatm.c\nM       drivers/usb/core/hcd-pci.c\nM       drivers/usb/core/hcd.c\nM       drivers/usb/core/hcd.h\nM       drivers/usb/host/ehci-pci.c\nM       drivers/usb/host/ehci-q.c\nM       drivers/usb/host/ehci-sched.c\nM       drivers/usb/host/ohci-hcd.c\nM       drivers/usb/host/ohci-hub.c\nM       drivers/usb/host/ohci-pci.c\nM       drivers/usb/host/uhci-hcd.c\nM       drivers/video/Kconfig\nM       drivers/video/cirrusfb.c\nM       drivers/video/console/fbcon_ccw.c\nM       drivers/video/console/fbcon_rotate.h\nM       fs/9p/vfs_inode.c\nM       fs/cifs/CHANGES\nM       fs/cifs/README\nM       fs/cifs/TODO\nM       fs/cifs/cifsfs.c\nM       fs/cifs/cifssmb.c\nM       fs/cifs/dir.c\nM       fs/cifs/inode.c\nM       fs/cifs/misc.c\nM       fs/cifs/netmisc.c\nM       fs/cifs/transport.c\nM       fs/dquot.c\nM       fs/exec.c\nM       fs/ext3/resize.c\nM       fs/fuse/dir.c\nM       fs/hfsplus/hfsplus_fs.h\nM       fs/hfsplus/hfsplus_raw.h\nM       fs/hfsplus/options.c\nM       fs/hfsplus/super.c\nM       fs/jffs2/fs.c\nM       fs/jffs2/super.c\nM       fs/proc/task_mmu.c\nM       fs/reiserfs/inode.c\nM       fs/reiserfs/journal.c\nM       include/asm-arm/arch-s3c2410/regs-gpio.h\nM       include/asm-arm/arch-sa1100/io.h\nM       include/asm-frv/hardirq.h\nM       include/asm-frv/ide.h\nM       include/asm-frv/page.h\nM       include/asm-frv/semaphore.h\nM       include/asm-frv/thread_info.h\nM       include/asm-ia64/page.h\nM       include/asm-m32r/atomic.h\nM       include/asm-m32r/ide.h\nM       include/asm-m32r/mappi3/mappi3_pld.h\nM       include/asm-m32r/system.h\nM       include/asm-sparc64/pgtable.h\nM       include/linux/atmdev.h\nM       include/linux/cn_proc.h\nM       include/linux/cpu.h\nM       include/linux/memory.h\nM       include/linux/mm.h\nM       include/linux/mmc/protocol.h\nM       include/linux/mtd/cfi.h\nM       include/linux/rmap.h\nM       include/linux/sched.h\nM       include/linux/serial_core.h\nM       include/linux/swap.h\nM       kernel/cpu.c\nM       kernel/fork.c\nM       kernel/posix-cpu-timers.c\nM       kernel/power/main.c\nM       kernel/ptrace.c\nM       kernel/workqueue.c\nM       lib/genalloc.c\nM       mm/fremap.c\nM       mm/madvise.c\nM       mm/memory.c\nM       mm/mempolicy.c\nM       mm/msync.c\nM       mm/nommu.c\nM       mm/page_alloc.c\nM       mm/rmap.c\nM       mm/thrash.c\nM       mm/vmscan.c\nM       net/atm/atm_misc.c\nM       net/atm/common.c\nM       net/atm/common.h\nM       net/atm/resources.c\nM       net/atm/resources.h\nM       net/ipv4/fib_hash.c\nM       net/ipv4/fib_semantics.c\nM       net/ipv4/icmp.c\nM       net/ipv4/ip_gre.c\nM       net/ipv4/ip_output.c\nM       net/ipv4/ipvs/ip_vs_conn.c\nM       net/ipv4/ipvs/ip_vs_ctl.c\nM       net/ipv4/ipvs/ip_vs_proto_tcp.c\nM       net/ipv4/netfilter/ip_conntrack_amanda.c\nM       net/ipv4/netfilter/ip_conntrack_core.c\nM       net/ipv4/netfilter/ip_conntrack_ftp.c\nM       net/ipv4/netfilter/ip_conntrack_irc.c\nM       net/ipv4/netfilter/ip_conntrack_proto_icmp.c\nM       net/ipv4/netfilter/ip_conntrack_proto_sctp.c\nM       net/ipv4/netfilter/ip_conntrack_proto_tcp.c\nM       net/ipv4/netfilter/ip_nat_core.c\nM       net/ipv4/netfilter/ip_tables.c\nM       net/ipv4/netfilter/ipt_LOG.c\nM       net/ipv4/proc.c\nM       net/ipv4/route.c\nM       net/ipv4/tcp.c\nM       net/ipv6/addrconf.c\nM       net/ipv6/icmp.c\nM       net/ipv6/ip6_output.c\nM       net/ipv6/ipv6_sockglue.c\nM       net/ipv6/netfilter/ip6_tables.c\n\n\nThanks,\n   Luben\n"},{"id":"13077","messageId":"7v3blccqtz.fsf@assigned-by-dhcp.cox.net","threadId":"2728","inReplyTo":"20051201231844.59450.qmail@web31801.mail.mud.yahoo.com","subject":"Re: resolve (merge) problems","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-01T23:58:32Z","receivedAt":"2005-12-01T23:58:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luben Tuikov <ltuikov@yahoo.com> writes:\n\n> $ git resolve HEAD master \"merge linus' tree\"\n> Trying to merge 5666c0947ede0432ba5148570aa66ffb9febff5b into\n> 32df3299405fb7054b76346899f3db2fa29150fb using 458af5439fe7ae7d95ca14106844e61f0795166c.\n> Simple merge failed, trying Automatic merge\n> Removing arch/arm/configs/poodle_defconfig\n> Removing drivers/atm/atmdev_init.c\n> fatal: merge program failed\n> Automatic merge failed, fix up by hand\n>\n> How do I proceed from here?\n>\n> The output from git-diff-index is:\n>\n> $git-diff-index --name-status HEAD\n> M       Documentation/usb/error-codes.txt\n> M       Makefile\n> M       arch/arm/configs/corgi_defconfig\n> U       arch/arm/configs/poodle_defconfig\n> M       arch/arm/configs/spitz_defconfig\n\nEasier to read is:\n\n\t$ git-diff-files --name-status\n\nwhich would tell you that there two files have conflicting\nchanges:\n\nU       arch/arm/configs/poodle_defconfig\nU       drivers/atm/atmdev_init.c\n\nand you would hopefully not see anything else (you saw tons of\npaths only because you compared against HEAD, which shows not\njust conflicts but everything the merge brought in).\n\n\t$ git diff arch/arm/configs/poodle_defconfig drivers/atm/atmdev_init.c\n\nwould give you the diff between your version (before merging)\nand the half-merged file with conflict markers.  Resolve them\njust like you would resolve conflicting changes.  I would\nusually just open these files in an editor, and pick one of the\nsections between <<< == >>> these markers.\n\nOne nifty tool I saw suggested on the list recently was xxdiff:\n\n\t$ xxdiff -U arch/arm/configs/poodle_defconfig\n\nNo matter how you would resolve, the first goal of yours is to\nget these files in your working tree into a good shape, which\nmay involve compiling and testing.  Once you have these files in\na good enough shape, you tell git that you are done with them:\n\n\t$ git update-index \\\n        \tarch/arm/configs/poodle_defconfig drivers/atm/atmdev_init.c\n\nand commit.\n\n\t$ git commit\n\nThe commit message editor would loudly warn you that you are\ncommitting a merge, but that is OK because that is what you are\ndoing.  You might want to describe how you resolved (which side\nyou picked) the conflicting changes in the log, in addition to\nthe standard boilerplate \"merged that branch\" message.\n"},{"id":"13078","messageId":"20051202000715.8100.qmail@web31810.mail.mud.yahoo.com","threadId":"2728","inReplyTo":"7v3blccqtz.fsf@assigned-by-dhcp.cox.net","subject":"Re: resolve (merge) problems","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2005-12-02T00:07:15Z","receivedAt":"2005-12-02T00:07:15Z","isPatch":false,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Junio C Hamano <junkio@cox.net> wrote:\n> Easier to read is:\n> \n> \t$ git-diff-files --name-status\n\nOk this is what it shows:\n\n$git-diff-files --name-status\nU       arch/arm/configs/poodle_defconfig\nD       arch/arm/configs/poodle_defconfig\nU       drivers/atm/atmdev_init.c\nD       drivers/atm/atmdev_init.c\n\nUnmerged and deleted?  Is this correct?\n\n    Luben\n"},{"id":"13079","messageId":"Pine.LNX.4.64.0512011556480.3099@g5.osdl.org","threadId":"2728","inReplyTo":"20051201231844.59450.qmail@web31801.mail.mud.yahoo.com","subject":"Re: resolve (merge) problems","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-12-02T00:07:33Z","receivedAt":"2005-12-02T00:07:33Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 1 Dec 2005, Luben Tuikov wrote:\n> \n> $git resolve HEAD master \"merge linus' tree\"\n> Trying to merge 5666c0947ede0432ba5148570aa66ffb9febff5b into\n> 32df3299405fb7054b76346899f3db2fa29150fb using 458af5439fe7ae7d95ca14106844e61f0795166c.\n> Simple merge failed, trying Automatic merge\n> Removing arch/arm/configs/poodle_defconfig\n> Removing drivers/atm/atmdev_init.c\n> fatal: merge program failed\n> Automatic merge failed, fix up by hand\n> \n> How do I proceed from here?\n\nWell, first off, you would probably have been better off with the smarter \nrecursive merge instead of the old \"git resolve\":\n\n\tgit merge -s recursive \"merge linus' tree\" HEAD master\n\n(the \"-s recursive\" isn't really needed, it _should_ be the default).\n\nYou can re-try that by doing a \"git reset --hard\" (to get rid of the \npartial merge) and just starting over.\n\n> The output from git-diff-index is:\n\nDon't. You'll see all the changes relative to HEAD, which _includes_ all \nthe stuff that got cleanly merged.\n\nInstead, do just a\n\n\tgit diff\n\nor perhaps\n\n\tgit-diff-files --name-status\n\nwhich will show much better what is going on. In this case, I suspect that \nthe problem is that my branch removed \"poodle_defconfig\", and you had \nchanges in it, no? Or maybe there were conflicts in atmdev_init.c, so they \ngot left in an unmerged state..\n\nRegardless, the git-diff-files interface should show you which files are \nunmerged and need to be fixed up.\n\nJust fix them up: either remove them, or edit them to taste, and then do \n\"git-update-index <filename>\" (add the \"--remove\" option if you deleted \nthe file), and then finish it off when you're happy with a \"git commit\".\n\nThat _should_ fix it all up.\n\n\t\tLinus\n"},{"id":"13082","messageId":"7vhd9sb9ie.fsf@assigned-by-dhcp.cox.net","threadId":"2728","inReplyTo":"20051202000715.8100.qmail@web31810.mail.mud.yahoo.com","subject":"Re: resolve (merge) problems","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-02T00:58:01Z","receivedAt":"2005-12-02T00:58:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luben Tuikov <ltuikov@yahoo.com> writes:\n\n> --- Junio C Hamano <junkio@cox.net> wrote:\n>> Easier to read is:\n>> \n>> \t$ git-diff-files --name-status\n>\n> Ok this is what it shows:\n>\n> $git-diff-files --name-status\n> U       arch/arm/configs/poodle_defconfig\n> D       arch/arm/configs/poodle_defconfig\n> U       drivers/atm/atmdev_init.c\n> D       drivers/atm/atmdev_init.c\n>\n> Unmerged and deleted?  Is this correct?\n\nYes, the first lets you notice it is unmerged, and the second\nsays the file does not remain in the working tree.\n\nHowever, there is a bug recently introduced in the\nmerge-one-file script.  \n\nAlthough the conflict resolution procedure I described applies\nif you really had a real conflicting merge, I suspect your merge\nshould not have failed in the first place.\n\n        case \"${1:-.}${2:-.}${3:-.}\" in\n        #\n        # Deleted in both or deleted in one and unchanged in the other\n        #\n        \"$1..\" | \"$1.$1\" | \"$1$1.\")\n                if [ \"$2\" ]; then\n                        echo \"Removing $4\"\n                fi\n                if test -f \"$4\"; then\n                        rm -f -- \"$4\" &&\n                        rmdir -p \"$(expr \"$4\" : '\\(.*\\)/')\" 2>/dev/null\n                fi &&\n                        exec git-update-index --remove -- \"$4\"\n                ;;\n\nThe faliure code from \"rmdir -p\" leaks up and makes\ngit-update-index to be skipped.  Here is a fix.\n\n-- >8 --\n[PATCH] merge-one-file fix\n\n9ae2172aed289f2706a0e88288909fa47eddd7e7 used \"rmdir -p\"\ncarelessly, causing the \"git-update-index --remove\" to be\nskipped.\n\n---\ndiff --git a/git-merge-one-file.sh b/git-merge-one-file.sh\nindex 739a072..9a049f4 100755\n--- a/git-merge-one-file.sh\n+++ b/git-merge-one-file.sh\n@@ -26,7 +26,7 @@ case \"${1:-.}${2:-.}${3:-.}\" in\n \tfi\n \tif test -f \"$4\"; then\n \t\trm -f -- \"$4\" &&\n-\t\trmdir -p \"$(expr \"$4\" : '\\(.*\\)/')\" 2>/dev/null\n+\t\trmdir -p \"$(expr \"$4\" : '\\(.*\\)/')\" 2>/dev/null || :\n \tfi &&\n \t\texec git-update-index --remove -- \"$4\"\n \t;;\n"},{"id":"13085","messageId":"20051202014423.56174.qmail@web31801.mail.mud.yahoo.com","threadId":"2728","inReplyTo":"Pine.LNX.4.64.0512011556480.3099@g5.osdl.org","subject":"Re: resolve (merge) problems","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2005-12-02T01:44:23Z","receivedAt":"2005-12-02T01:44:23Z","isPatch":false,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Linus Torvalds <torvalds@osdl.org> wrote:\n> Well, first off, you would probably have been better off with the smarter \n> recursive merge instead of the old \"git resolve\":\n> \n> \tgit merge -s recursive \"merge linus' tree\" HEAD master\n> \n> (the \"-s recursive\" isn't really needed, it _should_ be the default).\n> \n> You can re-try that by doing a \"git reset --hard\" (to get rid of the \n> partial merge) and just starting over.\n\nOk, what I've been doing is:\ngit-read-tree --reset -u <last committish>\ngit-checkout-index -u -f -a\n\nto \"roll-back\" the index to the last \"good\" state.\n(but I guess that has the same effect)\n\nThen I re-tried the new git merge, and got this:\n\n$git merge -s recursive \"merge linus' tree\" HEAD master \nTrying really trivial in-index merge...\nfatal: Merge requires file-level merging\nNope.\nTraceback (most recent call last):\n  File \"/home/luben/bin/git-merge-recursive\", line 10, in ?\n    from heapq import heappush, heappop\nImportError: No module named heapq\nAutomatic merge failed/prevented; fix up by hand\n\nThe git I have is latest: b34403aa97047f90c0cdd5177e63a8e7530e3388\n\n> > The output from git-diff-index is:\n> \n> Don't. You'll see all the changes relative to HEAD, which _includes_ all \n> the stuff that got cleanly merged.\n> \n> Instead, do just a\n> \n> \tgit diff\n> \n> or perhaps\n> \n> \tgit-diff-files --name-status\n> \n> which will show much better what is going on. In this case, I suspect that \n> the problem is that my branch removed \"poodle_defconfig\", and you had \n> changes in it, no? Or maybe there were conflicts in atmdev_init.c, so they \n> got left in an unmerged state..\n\nThe former.  Simple deletion.  I've noticed that\nI've those problems only when the file has been completely\ndeleted in the tree I'm trying to merge (from).\n\nThe index is left in a state where the file doesn't\nexist in the working tree but is in the index.\n\nNot sure if this is a general problem.  I'd like to\nnote though that the branches are in _different_ directories, (different index and HEAD of\ncourse),\nbut everything else is shared (symlinks).\n\n> \n> Regardless, the git-diff-files interface should show you which files are \n> unmerged and need to be fixed up.\n> \n> Just fix them up: either remove them, or edit them to taste, and then do \n> \"git-update-index <filename>\" (add the \"--remove\" option if you deleted \n> the file), and then finish it off when you're happy with a \"git commit\".\n> \n> That _should_ fix it all up.\n\nOk, that worked.  The sequence I did is:\n\n$git reset --hard\n$git resolve HEAD master \"merge linus' tree\"\nTrying to merge deda498710e190c7922c2634ed630ee64ce86c05 into\n6fea38404a5ce270d73df9cde561135defe9ab39 using 5666c0947ede0432ba5148570aa66ffb9febff5b.\nSimple merge failed, trying Automatic merge\nAuto-merging MAINTAINERS.\nRemoving drivers/net/sk98lin/skcsum.c\nfatal: merge program failed\nAutomatic merge failed, fix up by hand\n$git-diff-files --name-status\nU       drivers/net/sk98lin/skcsum.c\nD       drivers/net/sk98lin/skcsum.c\n$git-update-index --remove drivers/net/sk98lin/skcsum.c\n$git commit -s \"merge linus' tree\"\n\nAnd that worked.  But at some point it did the right\nthing only with \"git resolve ...\"  What has changed?\n\nThanks,\n   Luben\n"},{"id":"13086","messageId":"20051202015039.93047.qmail@web31811.mail.mud.yahoo.com","threadId":"2728","inReplyTo":"7vhd9sb9ie.fsf@assigned-by-dhcp.cox.net","subject":"Re: resolve (merge) problems","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2005-12-02T01:50:39Z","receivedAt":"2005-12-02T01:50:39Z","isPatch":false,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Junio C Hamano <junkio@cox.net> wrote:\n> However, there is a bug recently introduced in the\n> merge-one-file script.  \n\nOk, if your patch below resolves the bug (please see my\nother email just posted) please submit it.  (I'm hitting\nthis bug everytime there's a file deleted from the\nkernel tree and I try to merge.)\n\nThanks,\n   Luben\n\n\n> \n> Although the conflict resolution procedure I described applies\n> if you really had a real conflicting merge, I suspect your merge\n> should not have failed in the first place.\n> \n>         case \"${1:-.}${2:-.}${3:-.}\" in\n>         #\n>         # Deleted in both or deleted in one and unchanged in the other\n>         #\n>         \"$1..\" | \"$1.$1\" | \"$1$1.\")\n>                 if [ \"$2\" ]; then\n>                         echo \"Removing $4\"\n>                 fi\n>                 if test -f \"$4\"; then\n>                         rm -f -- \"$4\" &&\n>                         rmdir -p \"$(expr \"$4\" : '\\(.*\\)/')\" 2>/dev/null\n>                 fi &&\n>                         exec git-update-index --remove -- \"$4\"\n>                 ;;\n> \n> The faliure code from \"rmdir -p\" leaks up and makes\n> git-update-index to be skipped.  Here is a fix.\n> \n> -- >8 --\n> [PATCH] merge-one-file fix\n> \n> 9ae2172aed289f2706a0e88288909fa47eddd7e7 used \"rmdir -p\"\n> carelessly, causing the \"git-update-index --remove\" to be\n> skipped.\n> \n> ---\n> diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh\n> index 739a072..9a049f4 100755\n> --- a/git-merge-one-file.sh\n> +++ b/git-merge-one-file.sh\n> @@ -26,7 +26,7 @@ case \"${1:-.}${2:-.}${3:-.}\" in\n>  \tfi\n>  \tif test -f \"$4\"; then\n>  \t\trm -f -- \"$4\" &&\n> -\t\trmdir -p \"$(expr \"$4\" : '\\(.*\\)/')\" 2>/dev/null\n> +\t\trmdir -p \"$(expr \"$4\" : '\\(.*\\)/')\" 2>/dev/null || :\n>  \tfi &&\n>  \t\texec git-update-index --remove -- \"$4\"\n>  \t;;\n> \n> \n> \n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n"},{"id":"13087","messageId":"7vpsog9s5e.fsf@assigned-by-dhcp.cox.net","threadId":"2728","inReplyTo":"20051202015039.93047.qmail@web31811.mail.mud.yahoo.com","subject":"Re: resolve (merge) problems","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-02T01:58:21Z","receivedAt":"2005-12-02T01:58:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luben Tuikov <ltuikov@yahoo.com> writes:\n\n> Ok, if your patch below resolves the bug (please see my\n> other email just posted) please submit it.  (I'm hitting\n> this bug everytime there's a file deleted from the\n> kernel tree and I try to merge.)\n\nSorry to hear that.  The patch I sent you is already pushed out\nand mirrored the public machines.\n\nThe failure from '-s recursive' (lack of heapq) makes me suspect\nthat your Python installation is too old.  The 'resolve' method\nyou've been using should work fine for this case; otherwise\nreplace '-s recursive' in the message from Linus with '-s\nresolve' for the 'git merge' commandline, like this:\n\n\t$ git merge -s resolve \"merge linus' tree\" HEAD master\n"},{"id":"13088","messageId":"20051202020512.99856.qmail@web31811.mail.mud.yahoo.com","threadId":"2728","inReplyTo":"7vpsog9s5e.fsf@assigned-by-dhcp.cox.net","subject":"Re: resolve (merge) problems","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2005-12-02T02:05:12Z","receivedAt":"2005-12-02T02:05:12Z","isPatch":false,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Junio C Hamano <junkio@cox.net> wrote:\n\n> Luben Tuikov <ltuikov@yahoo.com> writes:\n> \n> > Ok, if your patch below resolves the bug (please see my\n> > other email just posted) please submit it.  (I'm hitting\n> > this bug everytime there's a file deleted from the\n> > kernel tree and I try to merge.)\n> \n> Sorry to hear that.  The patch I sent you is already pushed out\n> and mirrored the public machines.\n\nYes, I pulled right after I posted and saw you pushed it.\n\n> \n> The failure from '-s recursive' (lack of heapq) makes me suspect\n> that your Python installation is too old.  The 'resolve' method\n> you've been using should work fine for this case; \n\n$python -V\nPython 2.4.2\n$which python\n/usr/local/bin/python\n\n>otherwise\n> replace '-s recursive' in the message from Linus with '-s\n> resolve' for the 'git merge' commandline, like this:\n> \n> \t$ git merge -s resolve \"merge linus' tree\" HEAD master\n\nOk, I'll try this next time I hit this problem.\n\nThanks,\n   Luben\n"},{"id":"13089","messageId":"7vk6eo9jag.fsf@assigned-by-dhcp.cox.net","threadId":"2728","inReplyTo":"20051202020512.99856.qmail@web31811.mail.mud.yahoo.com","subject":"Re: resolve (merge) problems","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-02T05:09:43Z","receivedAt":"2005-12-02T05:09:43Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luben Tuikov <ltuikov@yahoo.com> writes:\n\n> $python -V\n> Python 2.4.2\n> $which python\n> /usr/local/bin/python\n\nSince you do not want to use /usr/bin/python but from your own\nlocation /usr/local/bin/python, I presume you built git with\n\n\t$ make PYTHON_PATH=/usr/local/bin/python\n\namong other installation specific override needed on your\nmachine?\n"},{"id":"13106","messageId":"20051202135937.86549.qmail@web31811.mail.mud.yahoo.com","threadId":"2728","inReplyTo":"7vk6eo9jag.fsf@assigned-by-dhcp.cox.net","subject":"Re: resolve (merge) problems","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2005-12-02T13:59:37Z","receivedAt":"2005-12-02T13:59:37Z","isPatch":false,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Junio C Hamano <junkio@cox.net> wrote:\n\n> Luben Tuikov <ltuikov@yahoo.com> writes:\n> \n> > $python -V\n> > Python 2.4.2\n> > $which python\n> > /usr/local/bin/python\n> \n> Since you do not want to use /usr/bin/python but from your own\n> location /usr/local/bin/python, I presume you built git with\n> \n> \t$ make PYTHON_PATH=/usr/local/bin/python\n> \n> among other installation specific override needed on your\n> machine?\n\nOops :-) (lol)\n\nThanks,\n    Luben\n"}]}