From 854a20a74d537d57fc697c97d47b6be76e73d719 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sun, 24 Apr 2011 12:07:57 +0200 Subject: do not try to check removed files --- git-hooks/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-hooks') 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 = ) { chomp( $file ); if ( $file ne "GNUmakefile" && -- cgit