{"thread":{"id":"3168","subject":"No merge strategy handled the merge (git version 1.1.GIT)","startedAt":"2006-01-28T10:53:10Z","lastAt":"2006-01-29T23:50:19Z","messageCount":8,"participants":["Roberto Nibali","Fredrik Kuivinen","Radoslaw Szkodzinski","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"15179","messageId":"43DB4D16.6050807@drugphish.ch","threadId":"3168","inReplyTo":null,"subject":"No merge strategy handled the merge (git version 1.1.GIT)","fromName":"Roberto Nibali","fromEmail":"ratz@drugphish.ch","sentAt":"2006-01-28T10:53:10Z","receivedAt":"2006-01-28T10:53:10Z","isPatch":false,"sender":{"key":"ratz@drugphish.ch","avatar":null},"body":"Hello,\n\nI've been hacking on some features for IPVS in the Linux kernel recently \nbut abandoned work for 3 weeks. Today I wanted to re-sync with Linus to \nwork in a more up-to-date tree and simply typed (forgot I had previously \ndone work in that tree)\n\n     git-pull\n\nin my local repository tree, which resulted in following:\n\n[...]\nff/df76b725bc7c0ce7db0b123957c21989674aaf\npack/pack-0741dd55e7c560f401c7f37120f3203ad8664bb0.idx\npack/pack-0741dd55e7c560f401c7f37120f3203ad8664bb0.pack\n\nwrote 43124 bytes  read 122278591 bytes  66461.13 bytes/sec\ntotal size is 122060858  speedup is 1.00\n* refs/heads/origin: fast forward to branch 'master' of \nrsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\nTrying really trivial in-index merge...\nfatal: Merge requires file-level merging\nNope.\nMerging HEAD with 3ee68c4af3fd7228c1be63254b9f884614f9ebb2\nMerging:\n03f7e47c28dc1273395112c72ee198e86f2d576d Merge \nrsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6\n3ee68c4af3fd7228c1be63254b9f884614f9ebb2 [SPARC64]: Use \ncompat_sys_futimesat in 32-bit syscall table.\nfound 1 common ancestor(s):\n48ea753075aa15699bd5fac26faa08431aaa697b Merge branch 'release' of \ngit://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6\nRemoving arch/sh/boards/hp6xx/hp620/mach.c\nRemoving arch/ia64/ia32/ia32_ioctl.c\nRemoving drivers/net/sk98lin/skproc.c\nRemoving include/asm-arm/arch-epxa10db/timer00.h\nRemoving arch/powerpc/xmon/start_32.c\nRemoving arch/arm/mach-integrator/dma.c\nRemoving drivers/video/aty/xlinit.c\nRemoving arch/arm/mach-epxa10db/Makefile.boot\nRemoving scripts/lxdialog/lxdialog.c\nRemoving include/asm-mips/.gitignore\nRemoving arch/ppc/platforms/pmac_smp.c\nRemoving drivers/scsi/sym53c8xx_defs.h\nRemoving arch/ppc/platforms/pmac_pci.c\nRemoving arch/sparc64/kernel/ioctl32.c\nRemoving arch/powerpc/xmon/start_8xx.c\nRemoving arch/um/include/time_user.h\nRemoving include/asm-mips/riscos-syscall.h\nRemoving drivers/char/rio/poll.h\nRemoving drivers/char/rio/brates.h\nRemoving scripts/lxdialog/inputbox.c\nRemoving drivers/char/rio/eisa.h\nRemoving arch/ppc/boot/openfirmware/coffmain.c\nRemoving drivers/char/rio/proto.h\nRemoving drivers/char/rio/riowinif.h\nRemoving drivers/char/rio/riscos.h\nRemoving drivers/serial/uart00.c\nRemoving net/ipv6/netfilter/ip6t_length.c\nRemoving arch/sh/kernel/cpu/irq_ipr.c\nRemoving arch/s390/crypto/des_z990.c\nRemoving scripts/lxdialog/yesno.c\nRemoving arch/x86_64/boot/compressed/miscsetup.h\nRemoving net/ipv6/netfilter/ip6t_mark.c\nRemoving net/ipv6/netfilter/ip6t_NFQUEUE.c\nRemoving include/asm-arm/arch-epxa10db/io.h\nRemoving drivers/char/rio/hosthw.h\nRemoving arch/ppc/platforms/pmac_time.c\nRemoving net/ipv6/netfilter/ip6t_MARK.c\nRemoving kernel/crash_dump.c\nRemoving arch/arm/mach-epxa10db/irq.c\nRemoving arch/ppc/platforms/pmac_low_i2c.c\nRemoving drivers/char/rio/cmd.h\nRemoving drivers/net/arm/ether00.c\nRemoving arch/mips/kernel/ioctl32.c\nRemoving arch/um/kernel/skas/mem_user.c\nRemoving drivers/i2c/busses/i2c-pmac-smu.c\nRemoving drivers/input/mouse/maplemouse.c\nRemoving drivers/char/rio/rtahw.h\nRemoving drivers/char/rio/mca.h\nRemoving scripts/lxdialog/textbox.c\nAuto-merging net/ipv4/ipvs/ip_vs_ctl.c\nTraceback (most recent call last):\n   File \"/home/ratz/bin/git-merge-recursive\", line 915, in ?\n     firstBranch, secondBranch, graph)\n   File \"/home/ratz/bin/git-merge-recursive\", line 87, in merge\n     branch1Name, branch2Name)\n   File \"/home/ratz/bin/git-merge-recursive\", line 160, in mergeTrees\n     if not processEntry(entry, branch1Name, branch2Name):\n   File \"/home/ratz/bin/git-merge-recursive\", line 868, in processEntry\n     branch1Name, branch2Name)\n   File \"/home/ratz/bin/git-merge-recursive\", line 212, in mergeFile\n     src1, orig, src2], returnCode=True)\n   File \"/home/ratz/share/git-core/python/gitMergeCommon.py\", line 72, \nin runProgram\n     raise ProgramError(progStr, e.strerror)\nProgramError: merge -L HEAD/net/ipv4/ipvs/ip_vs_ctl.c -L \norig/net/ipv4/ipvs/ip_vs_ctl.c -L \n3ee68c4af3fd7228c1be63254b9f884614f9ebb2/net/ipv4/ipvs/ip_vs_ctl.c \n.merge_file_uofMwv .merge_file_hcesLs .merge_file_TwtEqw: No such file \nor directory\nNo merge strategy handled the merge.\n\nI'm all for verbosity when it comes to a problem with software, however \nthis output does not tell me much about what I could do to achieve \nfollowing state:\n\n1. Sync my local tree to Linus' tree.\n2. Merge my changes I've done locally with the resulting tree of 1.\n\ngit-diff shows me 222 unmerged paths, along with my changes:\n\n~> git-diff net/ipv4/ipvs/\n* Unmerged path net/ipv4/ipvs/ip_vs_ctl.c\ndiff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c\n* Unmerged path net/ipv4/ipvs/ip_vs_lblc.c\ndiff --git a/net/ipv4/ipvs/ip_vs_lblc.c b/net/ipv4/ipvs/ip_vs_lblc.c\n* Unmerged path net/ipv4/ipvs/ip_vs_lblcr.c\ndiff --git a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c\n* Unmerged path net/ipv4/ipvs/ip_vs_proto_tcp.c\ndiff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c \nb/net/ipv4/ipvs/ip_vs_proto_tcp.c\n\nWould it be faster for me to clone the current master again and diff the \nold (master, probably inconsistent) tree to master and merge the changes \nby hand? Of course I can start my work again from scratch, it's only \nbeen around 200 lines of changes so far ;).\n\nOh, btw, how is git branch -D supposed to work? Isn't there some code \nmissing?\n\nThanks for any insights,\nRoberto Nibali, ratz\n-- \necho \n'[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc\n"},{"id":"15195","messageId":"20060129120344.GB4815@c165.ib.student.liu.se","threadId":"3168","inReplyTo":"43DB4D16.6050807@drugphish.ch","subject":"Re: No merge strategy handled the merge (git version 1.1.GIT)","fromName":"Fredrik Kuivinen","fromEmail":"freku045@student.liu.se","sentAt":"2006-01-29T12:03:44Z","receivedAt":"2006-01-29T12:03:44Z","isPatch":false,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"On Sat, Jan 28, 2006 at 11:53:10AM +0100, Roberto Nibali wrote:\n> Hello,\n> \n> I've been hacking on some features for IPVS in the Linux kernel recently \n> but abandoned work for 3 weeks. Today I wanted to re-sync with Linus to \n> work in a more up-to-date tree and simply typed (forgot I had previously \n> done work in that tree)\n> \n>     git-pull\n> \n> in my local repository tree, which resulted in following:\n> \n\n...\n\n> Auto-merging net/ipv4/ipvs/ip_vs_ctl.c\n> Traceback (most recent call last):\n>   File \"/home/ratz/bin/git-merge-recursive\", line 915, in ?\n>     firstBranch, secondBranch, graph)\n>   File \"/home/ratz/bin/git-merge-recursive\", line 87, in merge\n>     branch1Name, branch2Name)\n>   File \"/home/ratz/bin/git-merge-recursive\", line 160, in mergeTrees\n>     if not processEntry(entry, branch1Name, branch2Name):\n>   File \"/home/ratz/bin/git-merge-recursive\", line 868, in processEntry\n>     branch1Name, branch2Name)\n>   File \"/home/ratz/bin/git-merge-recursive\", line 212, in mergeFile\n>     src1, orig, src2], returnCode=True)\n>   File \"/home/ratz/share/git-core/python/gitMergeCommon.py\", line 72, \n> in runProgram\n>     raise ProgramError(progStr, e.strerror)\n> ProgramError: merge -L HEAD/net/ipv4/ipvs/ip_vs_ctl.c -L \n> orig/net/ipv4/ipvs/ip_vs_ctl.c -L \n> 3ee68c4af3fd7228c1be63254b9f884614f9ebb2/net/ipv4/ipvs/ip_vs_ctl.c \n> .merge_file_uofMwv .merge_file_hcesLs .merge_file_TwtEqw: No such file \n> or directory\n> No merge strategy handled the merge.\n> \n\nThe problem is that merge(1), which is used for file-level merges,\ncouldn't be found. Is it installed on your system? If you use Linux,\nit is usually found in the \"rcs\" package in your favorite\ndistribution.\n\nThis have came up a couple of times now, we should probably make this\nerror message a bit less cryptic. I will send a patch in a separate\nmail.\n\n> I'm all for verbosity when it comes to a problem with software, however \n> this output does not tell me much about what I could do to achieve \n> following state:\n> \n> 1. Sync my local tree to Linus' tree.\n> 2. Merge my changes I've done locally with the resulting tree of 1.\n> \n\nIf your repository is in the state that the failed git-pull left it\nin, then the following actions should merge your changes with Linus'\ntree.\n\n1. Install merge(1)\n2. Run 'git reset --hard' (NOTE: Be careful with this command. It will\n   revert any uncommitted changes you may have in your working directory!)\n3. Run 'git pull'\n\n> Oh, btw, how is git branch -D supposed to work? Isn't there some code \n> missing?\n\nCould you be a bit more specific? Do you mean that there is code\nmissing in git-branch.sh? What happens when you run 'git branch -D\n<some branch>'? It seems to work fine here.\n\n- Fredrik\n"},{"id":"15196","messageId":"20060129121608.GC4815@c165.ib.student.liu.se","threadId":"3168","inReplyTo":"20060129120344.GB4815@c165.ib.student.liu.se","subject":"[PATCH] merge-recursive: Improve the error message printed when merge(1) isn't found.","fromName":"Fredrik Kuivinen","fromEmail":"freku045@student.liu.se","sentAt":"2006-01-29T12:16:08Z","receivedAt":"2006-01-29T12:16:08Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"\nSigned-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n\n---\n\n git-merge-recursive.py |   15 ++++++++++-----\n 1 files changed, 10 insertions(+), 5 deletions(-)\n\n75cd8eff434fd6e9cf7fff98f13a27bfaa1b363b\ndiff --git a/git-merge-recursive.py b/git-merge-recursive.py\nindex 56c3641..b17c8e5 100755\n--- a/git-merge-recursive.py\n+++ b/git-merge-recursive.py\n@@ -205,11 +205,16 @@ def mergeFile(oPath, oSha, oMode, aPath,\n             orig = runProgram(['git-unpack-file', oSha]).rstrip()\n             src1 = runProgram(['git-unpack-file', aSha]).rstrip()\n             src2 = runProgram(['git-unpack-file', bSha]).rstrip()\n-            [out, code] = runProgram(['merge',\n-                                      '-L', branch1Name + '/' + aPath,\n-                                      '-L', 'orig/' + oPath,\n-                                      '-L', branch2Name + '/' + bPath,\n-                                      src1, orig, src2], returnCode=True)\n+            try:\n+                [out, code] = runProgram(['merge',\n+                                          '-L', branch1Name + '/' + aPath,\n+                                          '-L', 'orig/' + oPath,\n+                                          '-L', branch2Name + '/' + bPath,\n+                                          src1, orig, src2], returnCode=True)\n+            except ProgramError, e:\n+                print >>sys.stderr, e\n+                die(\"Failed to execute 'merge'. merge(1) is used as the \"\n+                    \"file-level merge tool. Is 'merge' in your path?\")\n \n             sha = runProgram(['git-hash-object', '-t', 'blob', '-w',\n                               src1]).rstrip()\n-- \n0.99.9k.g3480-dirty\n"},{"id":"15197","messageId":"43DCB3D8.8010902@gorzow.mm.pl","threadId":"3168","inReplyTo":"20060129120344.GB4815@c165.ib.student.liu.se","subject":"Re: No merge strategy handled the merge (git version 1.1.GIT)","fromName":"Radoslaw Szkodzinski","fromEmail":"astralstorm@gorzow.mm.pl","sentAt":"2006-01-29T12:23:52Z","receivedAt":"2006-01-29T12:23:52Z","isPatch":false,"sender":{"key":"astralstorm@gorzow.mm.pl","avatar":null},"body":"> The problem is that merge(1), which is used for file-level merges,\n> couldn't be found. Is it installed on your system? If you use Linux,\n> it is usually found in the \"rcs\" package in your favorite\n> distribution.\n\nAlso in diffutils (the package with diff3).\n\n-- \nGPG Key id:  0xD1F10BA2\nFingerprint: 96E2 304A B9C4 949A 10A0  9105 9543 0453 D1F1 0BA2\n\nAstralStorm\n\n"},{"id":"15198","messageId":"43DCB5EA.3030804@gorzow.mm.pl","threadId":"3168","inReplyTo":"43DCB3D8.8010902@gorzow.mm.pl","subject":"Re: No merge strategy handled the merge (git version 1.1.GIT)","fromName":"Radoslaw Szkodzinski","fromEmail":"astralstorm@gorzow.mm.pl","sentAt":"2006-01-29T12:32:42Z","receivedAt":"2006-01-29T12:32:42Z","isPatch":false,"sender":{"key":"astralstorm@gorzow.mm.pl","avatar":null},"body":"Radoslaw Szkodzinski wrote:\n>> The problem is that merge(1), which is used for file-level merges,\n>> couldn't be found. Is it installed on your system? If you use Linux,\n>> it is usually found in the \"rcs\" package in your favorite\n>> distribution.\n> \n> Also in diffutils (the package with diff3).\n> \n\nNo, I was wrong. However, diff3 can merge files and should also be\nsupported. It is much lighter than full rcs.\n\nParameters:\ndiff3 -m local base new > mergedlocal\n\n-- \nGPG Key id:  0xD1F10BA2\nFingerprint: 96E2 304A B9C4 949A 10A0  9105 9543 0453 D1F1 0BA2\n\nAstralStorm\n\n"},{"id":"15231","messageId":"43DD52D5.8080003@drugphish.ch","threadId":"3168","inReplyTo":"20060129121608.GC4815@c165.ib.student.liu.se","subject":"Re: [PATCH] merge-recursive: Improve the error message printed when merge(1) isn't found.","fromName":"Roberto Nibali","fromEmail":"ratz@drugphish.ch","sentAt":"2006-01-29T23:42:13Z","receivedAt":"2006-01-29T23:42:13Z","isPatch":true,"sender":{"key":"ratz@drugphish.ch","avatar":null},"body":"> -            [out, code] = runProgram(['merge',\n> -                                      '-L', branch1Name + '/' + aPath,\n> -                                      '-L', 'orig/' + oPath,\n> -                                      '-L', branch2Name + '/' + bPath,\n> -                                      src1, orig, src2], returnCode=True)\n> +            try:\n> +                [out, code] = runProgram(['merge',\n> +                                          '-L', branch1Name + '/' + aPath,\n> +                                          '-L', 'orig/' + oPath,\n> +                                          '-L', branch2Name + '/' + bPath,\n> +                                          src1, orig, src2], returnCode=True)\n> +            except ProgramError, e:\n> +                print >>sys.stderr, e\n> +                die(\"Failed to execute 'merge'. merge(1) is used as the \"\n> +                    \"file-level merge tool. Is 'merge' in your path?\")\n\nThis has my vote as well.\n\nThanks for your support,\nRoberto Nibali, ratz\n-- \necho \n'[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc\n"},{"id":"15232","messageId":"43DD52ED.7090503@drugphish.ch","threadId":"3168","inReplyTo":"20060129120344.GB4815@c165.ib.student.liu.se","subject":"Re: No merge strategy handled the merge (git version 1.1.GIT)","fromName":"Roberto Nibali","fromEmail":"ratz@drugphish.ch","sentAt":"2006-01-29T23:42:37Z","receivedAt":"2006-01-29T23:42:37Z","isPatch":false,"sender":{"key":"ratz@drugphish.ch","avatar":null},"body":">>     raise ProgramError(progStr, e.strerror)\n>> ProgramError: merge -L HEAD/net/ipv4/ipvs/ip_vs_ctl.c -L \n>> orig/net/ipv4/ipvs/ip_vs_ctl.c -L \n>> 3ee68c4af3fd7228c1be63254b9f884614f9ebb2/net/ipv4/ipvs/ip_vs_ctl.c \n>> .merge_file_uofMwv .merge_file_hcesLs .merge_file_TwtEqw: No such file \n>> or directory\n>> No merge strategy handled the merge.\n>>\n> \n> The problem is that merge(1), which is used for file-level merges,\n> couldn't be found. Is it installed on your system? If you use Linux,\n> it is usually found in the \"rcs\" package in your favorite\n> distribution.\n\nThat's it, I've installed it now.\n\n> This have came up a couple of times now, we should probably make this\n> error message a bit less cryptic. I will send a patch in a separate\n> mail.\n\nThanks.\n\n> If your repository is in the state that the failed git-pull left it\n> in, then the following actions should merge your changes with Linus'\n> tree.\n> \n> 1. Install merge(1)\n> 2. Run 'git reset --hard' (NOTE: Be careful with this command. It will\n>    revert any uncommitted changes you may have in your working directory!)\n> 3. Run 'git pull'\n\nThis worked. And as you've mentioned, I lost the uncommitted changes.\n\n>> Oh, btw, how is git branch -D supposed to work? Isn't there some code \n>> missing?\n> \n> Could you be a bit more specific? Do you mean that there is code\n> missing in git-branch.sh? What happens when you run 'git branch -D\n> <some branch>'? It seems to work fine here.\n\nWell, I was trying to understand git a bit better, so I started reading \nthe source code and just found that -D wasn't documented on my system, \neven after a\n\ngit clone rsync://git.kernel.org/pub/scm/git/git.git/ GIT_HEAD\n\nI'm talking about following excerpt which I've looked at for 2 minutes:\n\n#!/bin/sh\n\nUSAGE='[-d <branch>] | [[-f] <branch> [start-point]]'\nLONG_USAGE='If no arguments, show available branches and mark current \nbranch with a star.\nIf one argument, create a new branch <branchname> based off of current HEAD.\nIf two arguments, create a new branch <branchname> based off of \n<start-point>.'\n\nSUBDIRECTORY_OK='Yes'\n. git-sh-setup\n\nheadref=$(git-symbolic-ref HEAD | sed -e 's|^refs/heads/||')\n\ndelete_branch () {\n     option=\"$1\"\n     shift\n     for branch_name\n     do\n         case \",$headref,\" in\n         \",$branch_name,\")\n             die \"Cannot delete the branch you are on.\" ;;\n         ,,)\n             die \"What branch are you on anyway?\" ;;\n         esac\n         branch=$(cat \"$GIT_DIR/refs/heads/$branch_name\") &&\n             branch=$(git-rev-parse --verify \"$branch^0\") ||\n                 die \"Seriously, what branch are you talking about?\"\n         case \"$option\" in\n         -D)\n             ;;\n[...]\n\nThis is slightly confusing, since I didn't see the shift after \ndelete_branch so it looked like a noop. On top of that \"-D\" did/does not \nseem to be documented. Skimming over your patch you've sent later to \nthis list, it appears you've fixed the documentation.\n\nBest regards,\nRoberto Nibali, ratz\n-- \necho \n'[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc\n"},{"id":"15233","messageId":"7vhd7mh9vo.fsf@assigned-by-dhcp.cox.net","threadId":"3168","inReplyTo":"43DD52ED.7090503@drugphish.ch","subject":"Re: No merge strategy handled the merge (git version 1.1.GIT)","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-29T23:50:19Z","receivedAt":"2006-01-29T23:50:19Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Roberto Nibali <ratz@drugphish.ch> writes:\n\n> ... \"not reading code before commenting\" omitted ...\n> On top of that \"-D\" did/does\n> not seem to be documented...\n\nWell, initially, not documenting it was done somewhat\ndeliberately, because -D is an operation that would lose\ninformation.  Running the command with -d option would reveal\nits existence after telling the user why we do not let it be\ndeleted by default.\n"}]}