From 036e0e6d788992aa4f9e384e31187c0df89d239e Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Fri, 10 Dec 2010 04:26:42 -0600 Subject: new gbuild system --- git-hooks/pre-commit | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'git-hooks') diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit index b6581a431989..45153ee04018 100755 --- a/git-hooks/pre-commit +++ b/git-hooks/pre-commit @@ -19,8 +19,8 @@ sub fix_whitespace($$) { # usually we have nothing to do ;-) return if ( keys( %{$lines} ) == 0 || - $file eq "" || - !( $file =~ /\.(c|cpp|cxx|h|hrc|hxx|idl|inl|java|map|mk|MK|pl|pm|pmk|py|sdi|sh|src|tab)/ ) ); + $file eq "" || $file eq "GNUmakefile" || + !( $file =~ /\.(c|cpp|cxx|h|hrc|hxx|idl|inl|java|map|MK|pl|pm|pmk|py|sdi|sh|src|tab)/ ) ); open( IN, "$file" ) || die "Cannot open $file for reading"; my ( $out, $tmpfile ) = mkstemp( "/tmp/whitespace-fixing-XXXXXX" ); @@ -126,7 +126,8 @@ my $err_ext = ""; open( FILES, "git diff-index --cached --name-only $against |" ) || die "Cannot run git diff-index."; while ( my $file = ) { chomp( $file ); - if ( $file =~ /\.(c|cpp|cxx|h|hrc|hxx|idl|inl|java|map|mk|MK|pmk|pl|pm|sdi|sh|src|tab|xcu|xml)$/) { + if ( $file ne "GNUmakefile" && + $file =~ /\.(c|cpp|cxx|h|hrc|hxx|idl|inl|java|map|MK|pmk|pl|pm|sdi|sh|src|tab|xcu|xml)$/) { open( F, "git diff-index -p --cached $against -- '$file' |" ); while ( my $line = ) { if ( $line =~ /^\+ *\t/ ) { -- cgit