git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Diff --stat for files that differ only in whitespace
@ 2020-07-31 13:10 Matt Rogers
  2020-07-31 17:32 ` Junio C Hamano
  2020-07-31 17:41 ` Jeff King
  0 siblings, 2 replies; 7+ messages in thread
From: Matt Rogers @ 2020-07-31 13:10 UTC (permalink / raw)
  To: Git Mailing List

When using a repository with "core.autocrlf=false" I'm trying to run a diff
between two commits that have many files (~1000) changed that differ mostly
in line endings or other whitespace.  When I run
`git diff --stat --ignore-all-space <commit-1> <commit-2>` I'm getting an output
that has many files listed like:

some-file.txt | 0

This is easy enough to parse through when it's a small number of files but when
there is ~1000 files with only maybe 1500 insertions/deletions showing it's not
really useful to me to see a list of those 1000 files, if there was a way to
sort by number of insertion/deletions or filter out the files that had 0
effective changes that would solve my problem.


Simple example:

```
mkdir example && cd example
git init
git config --local core.autocrlf false
echo HELLO > file.txt
echo WORLD >> file.txt
git add file.txt
git commit -m "first kind of line endings"

<use an editor to swap out the line endings>
git add file.txt
git commit -m "second kind of line endings"

git diff --stat --ignore-all-space HEAD~1 HEAD
```

Thanks,
Matthew Rogers

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-31 20:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31 13:10 Diff --stat for files that differ only in whitespace Matt Rogers
2020-07-31 17:32 ` Junio C Hamano
2020-07-31 17:41 ` Jeff King
2020-07-31 19:26   ` Matt Rogers
2020-07-31 19:48     ` Jeff King
2020-07-31 20:25     ` Junio C Hamano
2020-07-31 20:43       ` Matt Rogers

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).