From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 3/3] diff: disable diff.bwoutputonly warning
Date: Sat, 28 Nov 2009 23:26:18 -0800 [thread overview]
Message-ID: <7vaay5dc6d.fsf_-_@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7vmy25dc9h.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Sat\, 28 Nov 2009 23\:24\:26 -0800")
After 1.7.0 (or whatever version) ships and everybody expects the new
semantics from "diff", we can squelch the warning.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
diff.c | 11 -----------
t/t4015-diff-whitespace.sh | 4 ++--
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/diff.c b/diff.c
index df67f18..ba1f482 100644
--- a/diff.c
+++ b/diff.c
@@ -30,7 +30,6 @@ static const char *external_diff_cmd_cfg;
int diff_auto_refresh_index = 1;
static int diff_mnemonic_prefix;
static int diff_b_w_output_only;
-static int diff_b_w_output_only_given;
static char diff_colors[][COLOR_MAXLEN] = {
GIT_COLOR_RESET,
@@ -136,7 +135,6 @@ int git_diff_basic_config(const char *var, const char *value, void *cb)
}
if (!strcmp(var, "diff.bwoutputonly")) {
- diff_b_w_output_only_given = 1;
diff_b_w_output_only = git_config_bool(var, value);
return 0;
}
@@ -2523,11 +2521,6 @@ void diff_setup(struct diff_options *options)
}
}
-static const char *bw_option_warning =
- "ignore-whitespace options will stop showing diff headers in later\n"
- "versions of git; set diff.bwoutputonly to true to keep the old\n"
- "behaviour, or set.bwoutputonly to false to squelch this message.\n";
-
int diff_setup_done(struct diff_options *options)
{
int count = 0;
@@ -2553,10 +2546,6 @@ int diff_setup_done(struct diff_options *options)
bw_options = (DIFF_XDL_TST(options, IGNORE_WHITESPACE) ||
DIFF_XDL_TST(options, IGNORE_WHITESPACE_CHANGE) ||
DIFF_XDL_TST(options, IGNORE_WHITESPACE_AT_EOL));
- if (!diff_b_w_output_only_given && bw_options && bw_option_warning) {
- warning("%s", bw_option_warning);
- bw_option_warning = NULL;
- }
if (!diff_b_w_output_only && bw_options)
DIFF_OPT_SET(options, DIFF_FROM_CONTENTS);
else
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index 8ca81e8..0964ea2 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -433,10 +433,10 @@ test_expect_success 'no warning without diff.bwoutputonly' '
! grep "stop showing" errors
'
-test_expect_success 'warning without diff.bwoutputonly' '
+test_expect_success 'no warning anymore' '
git config --unset diff.bwoutputonly
git diff -b 2>errors &&
- grep "stop showing" errors
+ ! grep "stop showing" errors
'
test_expect_success 'combined diff with autocrlf conversion' '
--
1.6.6.rc0.61.g41d5b.dirty
prev parent reply other threads:[~2009-11-29 7:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-28 22:46 [RFH] Mention of 1.7.0 transition plans in Release Notes to 1.6.6 Junio C Hamano
2009-11-29 3:24 ` Nanako Shiraishi
2009-11-29 8:44 ` Junio C Hamano
2009-11-29 7:24 ` Junio C Hamano
2009-11-29 7:25 ` [PATCH 1/3] diff: flip the default diff.bwoutputonly to true Junio C Hamano
2009-11-29 7:25 ` [PATCH 2/3] diff: flip the diff.bwoutputonly default to false Junio C Hamano
2009-11-29 7:26 ` Junio C Hamano [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=7vaay5dc6d.fsf_-_@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/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).