Re: [PATCH 00/40] test whitespace - perform trivial whitespace clean ups of test scripts.
- From
Jeff King <peff@peff.net>
- Date
- Aug 6, 2011, 09:20 UTC
- Message-ID
- <20110806092029.GA7645@sigill.intra.peff.net>
- In-Reply-To
- <1312620119-18369-1-git-send-email-jon.seymour@gmail.com>
On Sat, Aug 06, 2011 at 06:41:59PM +1000, Jon Seymour wrote:
> The series applies cleanly to both master and pu. > > The first patch contains a script, t/test-cleaner.sh, that can > automate whitespace cleanup of tests.
Hmm. Can't we do something similar using git itself, and clean up all sorts of whitespace errors?
I tried:
rm t/t1006-cat-file.sh git diff -R | git apply --whitespace=fix
and ended up with the same blob as your script.
In theory you could do the whole tree:
git ls-files -z | xargs -0 rm git diff -R --binary | git apply --whitespace=fix
though it reports 604 whitespace errors, but only 489 lines fixed. And t1006 is not among the modified files. So I wonder if this is a bug in git-apply, or am I missing something.
-Peff