From: Junio C Hamano <gitster@pobox.com>
To: Steven Grimm <koreth@midwinter.com>
Cc: git@vger.kernel.org,
"Michael S. Tsirkin" <mst@dev.mellanox.co.il>,
Jeff King <peff@peff.net>
Subject: Re: [PATCH] diff: resurrect the traditional empty "diff --git" behaviour
Date: Fri, 31 Aug 2007 18:27:53 -0700 [thread overview]
Message-ID: <7vir6vw4x2.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <46D89844.8050605@midwinter.com> (Steven Grimm's message of "Fri, 31 Aug 2007 15:37:56 -0700")
Steven Grimm <koreth@midwinter.com> writes:
> Junio C Hamano wrote:
>> This commit reinstates the traditional behaviour as the default,
>> but with a twist.
>>
>> If you set diff.autorefreshindex configuration variable, it
>> squelches the empty "diff --git" output, and at the end of the
>> command, it automatically runs "update-index --refresh" without
>> even bothering the user. In other words, with the configuration
>> variable set, people who do not care about the cache-dirtyness
>> do not even have to see the warning.
>
> As the person who submitted the patch you're reversing with this, I
> agree 100% this is the better approach. Having the system self-heal is
> far preferable to requiring user action.
>
> I would vote for reversing the sense of that config variable,
(grudgingly...) Ok.
Old timers like myself have been warned on the list that
diff output will get quieter, so why not.
This is on top of the previous one in this thread.
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 903610f..cf7617a 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -396,6 +396,16 @@ color.status.<slot>::
commit.template::
Specify a file to use as the template for new commit messages.
+diff.autorefreshindex::
+ When using `git diff` to compare with work tree
+ files, do not consider stat-only change as changed.
+ Instead, silently run `git update-index --refresh` to
+ update the cached stat information for paths whose
+ contents in the work tree match the contents in the
+ index. This option defaults to true. Note that this
+ affects only `git diff` Porcelain, and not lower level
+ `diff` commands, such as `git diff-files`.
+
diff.renameLimit::
The number of files to consider when performing the copy/rename
detection; equivalent to the git diff option '-l'.
diff --git a/diff.c b/diff.c
index 75d95da..0d30d05 100644
--- a/diff.c
+++ b/diff.c
@@ -19,7 +19,7 @@
static int diff_detect_rename_default;
static int diff_rename_limit_default = -1;
static int diff_use_color_default;
-int diff_auto_refresh_index;
+int diff_auto_refresh_index = 1;
static char diff_colors[][COLOR_MAXLEN] = {
"\033[m", /* reset */
next prev parent reply other threads:[~2007-09-01 1:28 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 6:38 parallel make problem with git Michael S. Tsirkin
2007-08-30 6:46 ` Junio C Hamano
2007-08-30 6:50 ` Michael S. Tsirkin
2007-08-30 7:27 ` [PATCH] fix parallel make problem Michael S. Tsirkin
2007-08-31 2:02 ` Junio C Hamano
2007-08-31 8:06 ` Michael S. Tsirkin
2007-08-31 8:12 ` Junio C Hamano
2007-08-31 8:15 ` Michael S. Tsirkin
2007-08-31 8:36 ` Junio C Hamano
2007-08-31 15:21 ` Michael S. Tsirkin
2007-08-31 15:44 ` Junio C Hamano
2007-08-31 16:00 ` Michael S. Tsirkin
2007-08-31 16:11 ` Johannes Schindelin
2007-08-31 16:01 ` Junio C Hamano
2007-08-31 16:03 ` Jeff King
2007-08-31 20:13 ` [PATCH] diff: resurrect the traditional empty "diff --git" behaviour Junio C Hamano
2007-08-31 20:32 ` Jeff King
2007-08-31 20:57 ` Johannes Schindelin
2007-08-31 21:16 ` Junio C Hamano
2007-08-31 21:30 ` Johannes Schindelin
2007-08-31 21:20 ` David Kastrup
2007-08-31 21:32 ` Alex Riesen
2007-08-31 22:37 ` Steven Grimm
2007-09-01 1:27 ` Junio C Hamano [this message]
2007-09-03 8:09 ` Matthieu Moy
2007-09-03 8:36 ` 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=7vir6vw4x2.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=koreth@midwinter.com \
--cc=mst@dev.mellanox.co.il \
--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).