diff options
author | Andras Timar <atimar@novell.com> | 2011-04-14 10:21:53 +0200 |
---|---|---|
committer | Andras Timar <atimar@novell.com> | 2011-04-27 21:13:43 +0200 |
commit | 35cb158312b56e3776b036f8b6ee47a6d2952178 (patch) | |
tree | 5d71f658dcd6f342a338a09398717998208c7e1e /git-hooks/pre-commit | |
parent | 066300b5aa1326b16f72add98836a5908f5bf78e (diff) |
check if file exists in *.po hook
otherwise a removed file would be recreated
Diffstat (limited to 'git-hooks/pre-commit')
-rwxr-xr-x | git-hooks/pre-commit | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit index 7d69f4debb2f..8a316fdb70fe 100755 --- a/git-hooks/pre-commit +++ b/git-hooks/pre-commit @@ -155,7 +155,7 @@ while (my $file = <FILES>) { open(FILES, "git diff-index --cached --name-only $against |") || die "Cannot run git diff-index."; while (my $file = <FILES>) { chomp($file); - if ($file =~ /\.po$/) { + if ($file =~ /\.po$/ && -e $file) { system("msgcat --no-wrap $file > $file.KQnBbK6wQE;mv $file.KQnBbK6wQE $file;"); system("git add $file"); } |