From: Jeff King <peff@peff.net>
To: John Keeping <john@keeping.me.uk>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] add--interactive: respect diff.algorithm
Date: Wed, 12 Jun 2013 15:18:17 -0400 [thread overview]
Message-ID: <20130612191817.GA4898@sigill.intra.peff.net> (raw)
In-Reply-To: <20130612184410.GB23890@serenity.lan>
On Wed, Jun 12, 2013 at 07:44:10PM +0100, John Keeping wrote:
> When staging hunks interactively it is sometimes useful to use an
> alternative diff algorithm which splits the changes into hunks in a more
> logical manner. This is not possible because the plumbing commands
> called by add--interactive ignore the "diff.algorithm" configuration
> option (as they should).
>
> Since add--interactive is a porcelain command it should respect this
> configuration variable. To do this, make it read diff.algorithm and
> pass its value to the underlying diff-index and diff-files invocations.
>
> At this point, do not add options to "git add", "git reset" or "git
> checkout" (all of which can call git-add--interactive). If a user want
s/want/wants/
> > if (defined $diff_algorithm) {
> > push @diff_cmd, "--diff-algorithm=$diff_algorithm";
> > }
>
> OK. The "default" is actually "the value that is equivalent to 'myers'
> for diff.algorithm" and I was originally going to add --diff-algorithm
> to the command line unconditionally.
Yeah, that might have made sense, too, but the in-between (we know that
"default" is a special token and don't pass it) does not to me.
Patch looks obviously correct to me. Thanks.
-Peff
next prev parent reply other threads:[~2013-06-12 19:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 14:28 Different diff strategies in add --interactive John Keeping
2013-06-10 19:28 ` Junio C Hamano
2013-06-10 21:11 ` Jeff King
2013-06-10 21:46 ` John Keeping
2013-06-10 21:56 ` Jeff King
2013-06-12 18:44 ` [PATCH] add--interactive: respect diff.algorithm John Keeping
2013-06-12 19:18 ` Jeff King [this message]
2013-06-23 19:19 ` Junio C Hamano
2013-06-23 19:50 ` John Keeping
2013-06-23 20:37 ` Junio C Hamano
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=20130612191817.GA4898@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=john@keeping.me.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).