[libcode-tidyall-perl] 182/374: clarify

Jonas Smedegaard js at alioth.debian.org
Sun Sep 29 22:26:15 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 d32f092317139747395510c7dee4074c7aa2cf01
Author: Jonathan Swartz <swartz at pobox.com>
Date:   Wed Sep 5 03:05:20 2012 -0700

    clarify
---
 lib/Code/TidyAll/Git/Precommit.pm  |    2 +-
 lib/Code/TidyAll/Git/Prereceive.pm |   19 +++++++++++++------
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/lib/Code/TidyAll/Git/Precommit.pm b/lib/Code/TidyAll/Git/Precommit.pm
index ed48f71..658752f 100644
--- a/lib/Code/TidyAll/Git/Precommit.pm
+++ b/lib/Code/TidyAll/Git/Precommit.pm
@@ -62,7 +62,7 @@ sub check {
         my $error = $_;
         die "Error during pre-commit hook (use --no-verify to skip hook):\n$error";
     };
-    die $fail_msg if $fail_msg;
+    die "$fail_msg\n" if $fail_msg;
 }
 
 1;
diff --git a/lib/Code/TidyAll/Git/Prereceive.pm b/lib/Code/TidyAll/Git/Prereceive.pm
index 2b27d9c..4c990e4 100644
--- a/lib/Code/TidyAll/Git/Prereceive.pm
+++ b/lib/Code/TidyAll/Git/Prereceive.pm
@@ -57,7 +57,7 @@ sub check {
             print STDERR "*** Error running pre-receive hook (allowing push to proceed):\n$error";
         }
     };
-    die $fail_msg if $fail_msg;
+    die "$fail_msg\n" if $fail_msg;
 }
 
 sub create_tidyall {
@@ -140,15 +140,22 @@ tidied and valid according to L<tidyall|tidyall>. If not, then the entire push
 is rejected and the reason(s) are output to the client. e.g.
 
     % git push
-    2 files did not pass tidyall check
-    lib/CHI.pm: *** 'PerlTidy': needs tidying
-    lib/CHI/Driver.pm: *** 'PerlCritic': Code before strictures are enabled
-      at /tmp/Code-TidyAll-0e6K/Driver.pm line 2
-      [TestingAndDebugging::RequireUseStrict]
+    Counting objects: 9, done.
+    ...
+    remote: [checked] lib/CHI/Util.pm        
+    remote: Code before strictures are enabled on line 13 [TestingAndDebugging::RequireUseStrict]        
+    remote: 
+    remote: 1 file did not pass tidyall check        
+    To ...
+     ! [remote rejected] master -> master (pre-receive hook declined)
 
 The configuration file C<tidyall.ini> must be checked into git in the repo root
 directory, i.e. next to the .git directory.
 
+Unfortunately there is no easy way to bypass the pre-receive hook in an
+emergency.  It must be disabled in the repo being pushed to, e.g. by renaming
+.git/hooks/pre-receive.
+
 Passes mode = "commit" by default; see L<modes|tidyall/MODES>.
 
 Key/value parameters:

-- 
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