[libcode-tidyall-perl] 300/374: fix check_repeated_push
Jonas Smedegaard
js at alioth.debian.org
Sun Sep 29 22:26:39 UTC 2013
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository libcode-tidyall-perl.
commit 3aef32f4ae0ce5cfe6546c0e649ef010470bcc41
Author: Jonathan Swartz <swartz at pobox.com>
Date: Tue Oct 2 17:10:02 2012 -0700
fix check_repeated_push
---
lib/Code/TidyAll/Git/Prereceive.pm | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/Code/TidyAll/Git/Prereceive.pm b/lib/Code/TidyAll/Git/Prereceive.pm
index 032cfba..7d49c0a 100644
--- a/lib/Code/TidyAll/Git/Prereceive.pm
+++ b/lib/Code/TidyAll/Git/Prereceive.pm
@@ -120,20 +120,19 @@ sub check_repeated_push {
my $push_sig = sha1_hex($input);
if ( -f $last_push_file ) {
my ( $last_push_sig, $count ) = split( /\s+/, read_file($last_push_file) );
- print STDERR "*** last_push_sig = $last_push_sig\n";
if ( $last_push_sig eq $push_sig ) {
++$count;
print STDERR "*** Identical push seen $count times\n";
if ( $count >= $allow ) {
print STDERR "*** Allowing push to proceed despite errors\n";
+ unlink($last_push_file);
return 1;
}
+ write_file( $last_push_file, join( " ", $push_sig, $count ) );
+ return 0;
}
- write_file( $last_push_file, join( " ", $push_sig, $count ) );
- }
- else {
- write_file( $last_push_file, join( " ", $push_sig, 1 ) );
}
+ write_file( $last_push_file, join( " ", $push_sig, 1 ) );
}
}
return 0;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcode-tidyall-perl.git
More information about the Pkg-perl-cvs-commits
mailing list