On Mon, Jun 09, 2014 at 11:30:15PM -0700, André Hänsel wrote: > When I run "git diff -w --name-only" I get a file listed. When I > then run "git diff -w filename" I get no output. When I run "git > diff filename" I see that there are whitespace changes. > > How do I get the names of files with non-whitespace changes? Aren't > -w --name-only the correct options?
It does look like you have found a bug; `-w` and `--name-only` does
not seem to play nice together:
~~~~
% git --version
git version 2.0.0
% git diff
diff --git a/foo b/foo
index da91582..e1dac5f 100644
--- a/foo
+++ b/foo
@@ -1,3 +1,3 @@
-alsdkfja aldkfj kjfdlakjd aldfjal alsdjfla ldjalfaj
+alsdkfja aldkfj kjfdlakjd aldfjal alsdjfla ldjalfaj
aldkfj dalfjad lajdf ajfal ljl asldfjal lajf aalkjad
alsdjfl akjdfl ajdfl adjajf aj.
% git diff -w
% git diff -w --name-only
foo
~~~~
In the same vein, `-w` and `--name-status` doesn't seem to play well together
either:
~~~~
% git diff --name-status -w
M foo
~~~~
It also seems `-b` suffers from similar problems when combined with
`--name-{only,status}`.
/M
--
Magnus Therning OpenPGP: 0xAB4DFBA4
email: [email protected] jabber: [email protected]
twitter: magthe http://therning.org/magnus
In a hierarchy, every employee tends to rise to his level of incompetence.
-- The Peter Principle
pgpNmwJeHu3DB.pgp
Description: PGP signature
