On 2008.08.08 14:49:00 +0200, "Peter Valdemar Mørch (Lists)" wrote: > We have > 37000 white space "errors" in HEAD, mostly trailing > whitespace, and I'm looking for a > > $ git diff --check | git??? --whitespace=fix > > command. > > Is there such a beast? > > I see that git-apply has a --whitespace=<action> option, but I don't > seem to grock how to be able to use it for fixing my working directory. I'd probably do something like: # Create a commit with an empty tree rm .git/index git commit -m tmp rm -r * (include dotfiles if required, ie. remove all tracked files) git diff -R HEAD^ | git apply --index --whitespace=fix git commit --amend -m "Whitespace fixed up" But probably there's some smarter way than that. Björn -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html