{"thread":{"id":"35005","subject":"Unknown option for merge-recursive: -Xdiff-algorithm=minimal","startedAt":"2013-09-24T09:00:30Z","lastAt":"2013-09-24T10:01:29Z","messageCount":2,"participants":["Luke Noel-Storr","John Keeping"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"228147","messageId":"E523B437-A9D4-40DD-9720-C419CB6AC016@integrate.co.uk","threadId":"35005","inReplyTo":null,"subject":"Unknown option for merge-recursive: -Xdiff-algorithm=minimal","fromName":"Luke Noel-Storr","fromEmail":"luke.noel-storr@integrate.co.uk","sentAt":"2013-09-24T09:00:30Z","receivedAt":"2013-09-24T09:00:30Z","isPatch":false,"sender":{"key":"luke.noel-storr@integrate.co.uk","avatar":null},"body":"Hi,\n\nI'm trying to use the diff-algorithm option for recursive merge, but get the above error.  I've tried various different ways of specifying the option, but none work.\n\nTo try and find what the correct syntax is I tried peeping into the source code, and it looks like it may actually be an error in the code.\n\nThis is from merge-recursive.c line 2072:\n\n\telse if (!strcmp(s, \"diff-algorithm=\")) {\n\t\tlong value = parse_algorithm_value(s+15);\n\t\tif (value < 0)\n\t\t\treturn -1;\n\t\t/* clear out previous settings */\n\t\tDIFF_XDL_CLR(o, NEED_MINIMAL);\n\t\to->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;\n\t\to->xdl_opts |= value;\n\t}\n\nI believe !strcmp(s, \"diff-algorithm=\") should actually be !prefixcmp(s, \"diff-algorithm=\")\n\nCould someone confirm this is a bug, and is there any other way I can specify the diff algorithm?\n\n\nMany Thanks,\n\nLuke Noel-Storr.\n"},{"id":"228156","messageId":"20130924100129.GA27238@serenity.lan","threadId":"35005","inReplyTo":"E523B437-A9D4-40DD-9720-C419CB6AC016@integrate.co.uk","subject":"Re: Unknown option for merge-recursive: -Xdiff-algorithm=minimal","fromName":"John Keeping","fromEmail":"john@keeping.me.uk","sentAt":"2013-09-24T10:01:29Z","receivedAt":"2013-09-24T10:01:29Z","isPatch":false,"sender":{"key":"john@keeping.me.uk","avatar":"https://avatars.githubusercontent.com/u/1702081?v=4"},"body":"On Tue, Sep 24, 2013 at 10:00:30AM +0100, Luke Noel-Storr wrote:\n> I'm trying to use the diff-algorithm option for recursive merge, but\n> get the above error.  I've tried various different ways of specifying\n> the option, but none work.\n> \n> To try and find what the correct syntax is I tried peeping into the\n> source code, and it looks like it may actually be an error in the\n> code.\n> \n> This is from merge-recursive.c line 2072:\n> \n> \telse if (!strcmp(s, \"diff-algorithm=\")) {\n> \t\tlong value = parse_algorithm_value(s+15);\n> \t\tif (value < 0)\n> \t\t\treturn -1;\n> \t\t/* clear out previous settings */\n> \t\tDIFF_XDL_CLR(o, NEED_MINIMAL);\n> \t\to->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;\n> \t\to->xdl_opts |= value;\n> \t}\n> \n> I believe !strcmp(s, \"diff-algorithm=\") should actually be !prefixcmp(s, \"diff-algorithm=\")\n> \n> Could someone confirm this is a bug, and is there any other way I can specify the diff algorithm?\n\nI think you're right - this should be prefixcmp.\n\nThe simplest thing to do would be to patch it locally and run your own\nbuild - Git's Makefile installs in your home directory by default, so\nproviding $HOME/bin is on your path, \"make install\" will just give you\nsomething that works.\n\nOf course, you should then submit the patch here ;-)\n"}]}