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

Unknown option for merge-recursive: -Xdiff-algorithm=minimal

From
LNLuke Noel-Storr <luke.noel-storr@integrate.co.uk>
Date
Sep 24, 2013, 09:00 UTC
Message-ID
<E523B437-A9D4-40DD-9720-C419CB6AC016@integrate.co.uk>
Hi,
I'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.
To 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.
This is from merge-recursive.c line 2072:
	else if (!strcmp(s, "diff-algorithm=")) {
		long value = parse_algorithm_value(s+15);
		if (value < 0)
			return -1;
		/* clear out previous settings */
		DIFF_XDL_CLR(o, NEED_MINIMAL);
		o->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK;
		o->xdl_opts |= value;
	}
I believe !strcmp(s, "diff-algorithm=") should actually be !prefixcmp(s, "diff-algorithm=")
Could someone confirm this is a bug, and is there any other way I can specify the diff algorithm?
Many Thanks,
Luke Noel-Storr.
Next: John Keeping
Message 1 of 2 in “Unknown option for merge-recursive: -Xdiff-algorithm=minimal”
  1. Luke Noel-StorrSep 24, 2013
  2. John KeepingSep 24, 2013

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.