Please can you explain about whitespace errors in git, what do they mean, what is \'squelching\', and do I need to worry about it?
(Running msysgit, but with other u
Here is how to fix "trailing whitespace" errors when using git apply :
The first thing you need to know is : what is a whitespace error. This is explained on the core.whitespace setting documentation. Basically, git handles several kind of whitespace errors :
blank-at-eol
blank-at-eof
space-before-tab
indent-with-non-tab
tab-in-indent
cr-at-eol
trailing whitespace error can rise when patching a file using windows style line ending (CRLF).
To avoid this warning, you can either ask git apply to not show warning :
git apply --whitespace=nowarn fix.patch
or you can edit git configuration on the fly (with -c) to say "ok git, CR at end of line are fine this time" :
git -c core.whitespace=cr-at-eol apply fix.patch
If you want to make it permanent, just edit the git configuration like that :
git config apply.whitespace nowarn
or :
git config core.whitespace cr-at-eol