From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Junio C Hamano <junkio@cox.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: [PATCH] diff: squelch empty diffs even more
Date: Tue, 14 Aug 2007 23:09:57 +0200 [thread overview]
Message-ID: <46C21A25.2040304@lsrfire.ath.cx> (raw)
When we compare two non-tracked files or explicitly specify
--no-index then the suggestion to run git-status is not helpful.
max_count is set to -2 in these cases; don't print the warning
then.
Signed-off-by: Rene Scharfe <rene.scharfe@lsfire.ath.cx>
---
builtin-diff.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin-diff.c b/builtin-diff.c
index 6ed7b68..b2fd8c8 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -346,8 +346,8 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
if (rev.diffopt.exit_with_status)
result = rev.diffopt.has_changes;
- if ((rev.diffopt.output_format & DIFF_FORMAT_PATCH)
- && (1 < rev.diffopt.skip_stat_unmatch))
+ if ((rev.diffopt.output_format & DIFF_FORMAT_PATCH) &&
+ 1 < rev.diffopt.skip_stat_unmatch && rev.max_count != -2)
printf("Warning: %d path%s touched but unmodified. "
"Consider running git-status.\n",
rev.diffopt.skip_stat_unmatch - 1,
next reply other threads:[~2007-08-14 21:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-14 21:09 René Scharfe [this message]
2007-08-14 21:29 ` [PATCH] diff: squelch empty diffs even more Junio C Hamano
2007-08-14 22:41 ` René Scharfe
2007-08-14 23:52 ` Junio C Hamano
2007-08-15 14:47 ` Johannes Schindelin
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=46C21A25.2040304@lsrfire.ath.cx \
--to=rene.scharfe@lsrfire.ath.cx \
--cc=git@vger.kernel.org \
--cc=junkio@cox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.