]> git.ipfire.org Git - thirdparty/git.git/commit - diff.c
diff: teach --stat to ignore uninteresting modifications
authorMatthew Rogers <mattr94@gmail.com>
Thu, 20 Aug 2020 00:41:32 +0000 (00:41 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Aug 2020 00:53:32 +0000 (17:53 -0700)
commit1cf3d5db9bd11514465d3692216211315f0dc82c
tree2d49af1a30b44cc2f9a1977c55582bd254ae4201
parent47ae905ffb98cc4d4fd90083da6bc8dab55d9ecc
diff: teach --stat to ignore uninteresting modifications

When options such as --ignore-space-change are in use, files with
modifications can have no interesting textual changes worth showing.  In
such cases, "git diff --stat" shows 0 lines of additions and deletions.
Teach "git diff --stat" not to show such a path in its output, which
would be more natural.

However, we don't want to prevent the display  of all files that have 0
effective diffs since they could be the result of a rename, permission
change, or other similar operation that may still be of interest so we
special case additions and deletions as they are always interesting.

Signed-off-by: Matthew Rogers <mattr94@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
t/t4015-diff-whitespace.sh