[libcode-tidyall-perl] 295/374: don't process blank or single-line (possibly symlink) files

Jonas Smedegaard js at alioth.debian.org
Sun Sep 29 22:26:38 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 322b3fd0e6664292cf1c774ed772fd4e692f6ac3
Author: Jonathan Swartz <swartz at pobox.com>
Date:   Tue Oct 2 15:30:00 2012 -0700

    don't process blank or single-line (possibly symlink) files
---
 lib/Code/TidyAll/Git/Prereceive.pm |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/Code/TidyAll/Git/Prereceive.pm b/lib/Code/TidyAll/Git/Prereceive.pm
index d0d5a92..07b96b3 100644
--- a/lib/Code/TidyAll/Git/Prereceive.pm
+++ b/lib/Code/TidyAll/Git/Prereceive.pm
@@ -82,7 +82,9 @@ sub create_tidyall {
     foreach my $rel_file ( $conf_file, @{ $self->extra_conf_files } ) {
         my $contents = $self->get_file_contents( $rel_file, $commit )
           or die sprintf( "could not find file '%s' in repo root", $rel_file );
-        write_file( "$temp_dir/$rel_file", $contents );
+        if ( $contents =~ /\S/ && $contents =~ /\n/ ) {
+            write_file( "$temp_dir/$rel_file", $contents );
+        }
     }
     my $tidyall = $self->tidyall_class->new_from_conf_file(
         "$temp_dir/" . $conf_file,

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