I'm a relatively new git user and it is constantly surprising me (usually in a good way), but tonight it just did something I thought quite odd: it complained about trailing whitespace when I tried to commit. Why does git even care about trailing whitespace on any of my lines? Isn't that just text like anything else?
Not by default!
merlyn on 2007-09-21T14:49:25
Apparently, you've enabled the "commit hook" that does extra checking. If you don't want that checking, don't enable it. Did you install this from the sources, or from some RPM, because some RPMs (wrongly, imho) enable that hook?
Protecting you from yourself
jrockway on 2007-09-21T19:40:50
The warning is mostly to avoid cluttering the revision history with the revision where you kill the trailing whitespace. That makes "git blame" and similar analyses hard.
Re:Protecting you from yourself
Alias on 2007-11-30T07:10:48
Unfortunately, it also means that necessary whitespace-only POD lines are going to generate warnings.