Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

duff (16)

  (email not shown publicly)

Journal of duff (16)

Thursday September 20, 2007
11:18 PM

odd gitism

[ #34504 ]

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?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • 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?
    • Randal L. Schwartz
    • Stonehenge
  • 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.
    • Unfortunately, it also means that necessary whitespace-only POD lines are going to generate warnings.