[Ffmpeg-devel] [PATCH] from DivX, Part 1: cosmectic changes
    Diego Biurrun 
    diego
       
    Sun Jan  8 13:51:57 CET 2006
    
    
  
On Sat, Dec 17, 2005 at 06:36:03PM +0100, Michael Niedermayer wrote:
> 
> On Sat, Dec 17, 2005 at 08:24:44AM -0800, Mike Melanson wrote:
> > Diego Biurrun wrote:
> > >OK, I'll bite the bullet and do it.  While I'm at it I might as well
> > >remove all trailing whitespace.  Anything else (to consider)?
> > 
> > 	I love the idea. We just need to monitor this on an ongoing basis so 
> > those darn hard tabs do not sneak back in.
> 
> this can be done with CVSROOT/commitinfo assuming we have a volunteer to
> write and test a 1 line script to check if theres any violations
We have that volunteer, after all, I don't want to have my hard work
ruined ;)  So if nobody objects or has suggestions for a more elegant
solution, I'm going to add the following line
ALL     $CVSROOT/CVSROOT/style.sh %{s}
to CVSROOT/commitinfo along with the small script below.
Diego
#!/bin/sh
#
# Check committed files except Makefiles for tab characters
# and abort the commit if they contain tabs.
FILELIST="`echo $@ | sed s/Makefile//`"
for file in $FILELIST; do
    if grep -e '	' -e ' $' $file > /dev/null; then
        echo
        echo "Tabs or trailing whitespace found in $file."
        echo "Commit aborted, fix the issue and try again."
        echo
        exit 1
    fi
done
exit 0
    
    
More information about the ffmpeg-devel
mailing list