On Mon, 2009-01-05 at 14:05 -0500, Damian Krzeminski wrote:
> Kevin Thorley wrote:
> > On Mon, 2009-01-05 at 09:54 -0500, Carolyn Beeton wrote:
> >> I've been mostly ignoring this message, but I find it annoying as
> >> generally I don't like to cause warnings:
> >>
> >> .dotest/patch:56: trailing whitespace. 
> >>        OsSysLog::add(FAC_SUPERVISOR, PRI_DEBUG, " supInWaiting pid %ld
> >> returned %d", 
> >> warning: squelched 6 whitespace errors 
> >> warning: 11 lines add whitespace errors.
> >>
> > 
> > Personally I always use the --whitespace=strip option when doing a
> > rebase.  As far as I have seen, this only strips whitespace on files
> > that I have modified... i.e. whitespace that I introduced
> > 
> > Kevin
> > 
> > 
> 
> I actually went a bit further and enabled precommit hook on my main repo
> that checks against trailing spaces and refuses to accept commit unless
> they are removed.
> 
> chmod +x .git/hooks/pre-commit
> 
> I have a strip-trailing alias that looks like this:
> 
> alias strip-trailing='sed -e '\''s/ \+$//'\'''
> 
> I am sure that there is a better way :-)

If you use emacs, you can configure it to strip trailing whitespace when
you save the file (if you're curious, ask and I'll send you the elisp).
The problem with this (I used to do it) is that you end up changing lots
of lines in the file, which increases the likelyhood of pointless merge
conflicts.  Git does the right thing with these most of the time, but
svn has more trouble.




_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to