summaryrefslogtreecommitdiff
path: root/git-hooks
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-04-24 12:07:57 +0200
committerDavid Tardon <dtardon@redhat.com>2011-04-24 12:07:57 +0200
commit854a20a74d537d57fc697c97d47b6be76e73d719 (patch)
tree2a9517303df28b2d050c21083e3fb68139c6537b /git-hooks
parentdc825f76d690d51da73d93fffaa9ee9979224ac1 (diff)
do not try to check removed files
Diffstat (limited to 'git-hooks')
-rwxr-xr-xgit-hooks/pre-commit2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit
index 6c6fe4ee662f..4f3809ab9713 100755
--- a/git-hooks/pre-commit
+++ b/git-hooks/pre-commit
@@ -66,7 +66,7 @@ sub check_and_fix_whitespace($)
system( "git diff > $stash" );
system( "git checkout ." );
}
- open( FILES, "git diff-index --cached --name-only $head |" ) || die "Cannot run git diff-index.";
+ open( FILES, "git diff-index --cached --diff-filter=ACM --name-only $head |" ) || die "Cannot run git diff-index.";
while( my $file = <FILES> ) {
chomp( $file );
if ( $file ne "GNUmakefile" &&