git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Luke Noel-Storr <luke.noel-storr@integrate.co.uk>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Unknown option for merge-recursive: -Xdiff-algorithm=minimal
Date: Tue, 24 Sep 2013 11:01:29 +0100	[thread overview]
Message-ID: <20130924100129.GA27238@serenity.lan> (raw)
In-Reply-To: <E523B437-A9D4-40DD-9720-C419CB6AC016@integrate.co.uk>

On Tue, Sep 24, 2013 at 10:00:30AM +0100, Luke Noel-Storr wrote:
> 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?

I think you're right - this should be prefixcmp.

The simplest thing to do would be to patch it locally and run your own
build - Git's Makefile installs in your home directory by default, so
providing $HOME/bin is on your path, "make install" will just give you
something that works.

Of course, you should then submit the patch here ;-)

      reply	other threads:[~2013-09-24 10:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-24  9:00 Unknown option for merge-recursive: -Xdiff-algorithm=minimal Luke Noel-Storr
2013-09-24 10:01 ` John Keeping [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130924100129.GA27238@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=git@vger.kernel.org \
    --cc=luke.noel-storr@integrate.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).