From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Andrew Morton <akpm@linux-foundation.org>, git@vger.kernel.org
Subject: Re: [PATCH 3/3] diff: make "too many files" rename warning optional
Date: Sat, 03 May 2008 17:10:57 -0700 [thread overview]
Message-ID: <7vy76rrkry.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 20080430172553.GC23747@sigill.intra.peff.net
Jeff King <peff@peff.net> writes:
> In many cases, the warning ends up as clutter, because the
> diff is being done "behind the scenes" from the user (e.g.,
> when generating a commit diffstat), and whether we show
> renames or not is not particularly interesting to the user.
>
> However, in the case of a merge (which is what motivated the
> warning in the first place), it is a useful hint as to why a
> merge with renames might have failed.
>
> This patch makes the warning optional based on the code
> calling into diffcore. We default to not showing the
> warning, but turn it on for merges.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> This neglects the case where the user specifically does a diff asking
> for renames, but we turn it off. Maybe when "-M" is specified on the
> commandline to git-diff, we should set this option as well.
That sounds sensible. Like this?
diff --git a/diff.c b/diff.c
index f735519..e8a9286 100644
--- a/diff.c
+++ b/diff.c
@@ -2443,6 +2443,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
if ((options->rename_score = diff_scoreopt_parse(arg)) == -1)
return -1;
options->detect_rename = DIFF_DETECT_RENAME;
+ options->warn_on_too_large_rename = 1;
}
else if (!prefixcmp(arg, "-C")) {
if (options->detect_rename == DIFF_DETECT_COPY)
@@ -2450,6 +2451,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
if ((options->rename_score = diff_scoreopt_parse(arg)) == -1)
return -1;
options->detect_rename = DIFF_DETECT_COPY;
+ options->warn_on_too_large_rename = 1;
}
else if (!strcmp(arg, "--no-renames"))
options->detect_rename = 0;
next prev parent reply other threads:[~2008-05-04 0:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-26 13:32 warning: too many files, skipping inexact rename detection Andrew Morton
2008-04-26 13:57 ` Jeff King
2008-04-26 14:06 ` Andrew Morton
2008-04-26 14:52 ` Jeff King
2008-04-30 17:21 ` [PATCH 0/3] rename limit improvements Jeff King
2008-04-30 17:23 ` [PATCH 1/3] add merge.renamelimit config option Jeff King
2008-04-30 18:18 ` Jeff King
2008-05-03 20:15 ` Junio C Hamano
2008-05-04 19:31 ` Jeff King
2008-04-30 17:24 ` [PATCH 2/3] bump rename limit defaults Jeff King
2008-04-30 17:25 ` [PATCH 3/3] diff: make "too many files" rename warning optional Jeff King
2008-05-03 17:34 ` Ramsay Jones
2008-05-04 19:23 ` Jeff King
2008-05-04 23:28 ` Paul Mackerras
2008-05-05 13:59 ` Jeff King
2008-05-05 17:02 ` Jeff King
2008-05-05 19:52 ` Junio C Hamano
2008-05-12 11:15 ` Paul Mackerras
2008-05-06 22:33 ` Ramsay Jones
2008-05-06 22:29 ` Ramsay Jones
2008-05-04 0:10 ` Junio C Hamano [this message]
2008-05-04 19:20 ` Jeff King
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=7vy76rrkry.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=akpm@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).