diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-08-31 13:13:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-08-31 23:30:14 -0700 |
commit | aecbf914c43ab76e055fa8a25b12456ae74d91bc (patch) | |
tree | 92d91c10b55a5e54ed598acd1f0d58f8f35b1533 /Documentation | |
parent | 18e32b5b7af4175f852469159d004a2a8de64658 (diff) | |
download | git-aecbf914c43ab76e055fa8a25b12456ae74d91bc.tar.gz git-aecbf914c43ab76e055fa8a25b12456ae74d91bc.tar.xz |
git-diff: resurrect the traditional empty "diff --git" behaviour
The warning message to suggest "Consider running git-status" from
"git-diff" that we experimented with during the 1.5.3 cycle turns
out to be a bad idea. It robbed cache-dirty information from people
who valued it, while still asking users to run "update-index --refresh".
It was hoped that the new behaviour would at least have some educational
value, but not showing the cache-dirty paths like before meant that the
user would not even know easily which paths were cache-dirty, and it
made the need to refresh the index look like even more unnecessary chore.
This commit reinstates the traditional behaviour, but with a twist.
By default, the empty "diff --git" output is totally squelched out
from "git diff" output. At the end of the command, it automatically
runs "update-index --refresh" as needed, without even bothering the
user. In other words, people who do not care about the cache-dirtyness
do not even have to see the warning.
The traditional behaviour to see the stat-dirty output and to bypassing
the overhead of content comparison can be specified by setting the
configuration variable diff.autorefreshindex to false.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index 903610fec..cf7617a5b 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'. |