On Thu, 5 Mar 2009, Jeremy White wrote:
Much less important but still: please remove trailing whitespaces. 'git apply' should not produce any warnings.
I've discovered that if you use git-add to fully stage your commit, you can then run: git-diff-index --check HEAD immediately prior to committing; that will catch such warnings while it's easy to fix them.
What I do is: chmod a+x .git/hooks/pre-commit in my repository's top-level directory. With this, git-commit issues an error if my code has bad whitespaces (trailing or tab/space mixups), and I get back to the prompt. So then I get to fix my code, or I add the '-n' option to tell git-commit to not bother me. -- Francois Gouget <fgouget(a)free.fr> http://fgouget.free.fr/ In theory, theory and practice are the same, but in practice they're different.