diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-17 16:06:07 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-17 16:06:07 +0100 |
commit | 61a4bf5a07bf53d2311d1c773e3087d89fc5be5e (patch) | |
tree | 5374cbf15147e76f8b0f375701b45b41ba6321b1 /git-hooks/pre-commit | |
parent | e175056684aed02597ab8117b22e89ef0c3a5173 (diff) | |
parent | 064a0b4957300d464384468e172fff6dc01d3875 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
set_soenv.in
Diffstat (limited to 'git-hooks/pre-commit')
-rwxr-xr-x | git-hooks/pre-commit | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit index 8192e5840c56..6817990eeb98 100755 --- a/git-hooks/pre-commit +++ b/git-hooks/pre-commit @@ -20,8 +20,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" ); @@ -157,7 +157,8 @@ my $err_ext = ""; open( FILES, "git diff-index --cached --name-only $against |" ) || die "Cannot run git diff-index."; while ( my $file = <FILES> ) { 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 = <F> ) { if ( $line =~ /^\+ *\t/ ) { |