Re: Trailing Whitespace
Samuel Bronson <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Dmitry Samersoff <dms <at> samersoff.net> writes:
> IMHO, better approach is to install on-commit hook blocking commits
> with trailing whitespace (and tab characters) and leave old code as is.
Unfortunately, commit hooks have to be set up in every local copy of the
repository, which I can't see happening.
On the other hand, there *is* a sample "pre-commit" hook to catch trailing
whitespace installed by default in every new git repository, so it would be
as simple as running "mv .git/hooks/pre-commit{.sample,}".