This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Trailing Whitespace
- From: Samuel Bronson <naesten at gmail dot com>
- To: gdb at sourceware dot org
- Date: Fri, 10 Jan 2014 03:44:28 +0000 (UTC)
- Subject: Re: Trailing Whitespace
- Authentication-results: sourceware.org; auth=none
- References: <CA+XNFZP6JzmOGo=nQDd4kab8RK1zvR4sij_zgS7qdPw7C1W9Vw at mail dot gmail dot com> <20140109144455 dot GA2972 at blade dot nx> <20140109145731 dot GA13720 at localhost dot localdomain> <20140109150145 dot GA3788 at adacore dot com> <52CEEE7B dot 50506 at samersoff dot net>
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,}".