From: Eric Wong Date: Thu, 24 Nov 2005 07:56:31 +0000 (-0800) Subject: archimport: Fix a bug I introduced in the new log parser X-Git-Tag: v0.99.9m^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6e33101abd82f38393b8f2a137601add845722f7;p=git.git archimport: Fix a bug I introduced in the new log parser This fixes the case (that worked originally in Martin's version) where the only new/modified files are Arch control files. Signed-off-by: Eric Wong Signed-off-by: Martin Langhoff --- diff --git a/git-archimport.perl b/git-archimport.perl index 1cf126181..008085001 100755 --- a/git-archimport.perl +++ b/git-archimport.perl @@ -790,7 +790,7 @@ sub parselog { # skip Arch control files, unescape pika-escaped files foreach my $k (keys %want_headers) { next unless (defined $ps->{$k}); - my @tmp; + my @tmp = (); foreach my $t (@{$ps->{$k}}) { next unless length ($t); next if $t =~ m!\{arch\}/!; @@ -804,7 +804,7 @@ sub parselog { } push @tmp, $t; } - $ps->{$k} = \@tmp if scalar @tmp; + $ps->{$k} = \@tmp; } }