annotate: fix warning about uninitialized scalar
authorMatthias Kestenholz <matthias@spinlock.ch>
Fri, 28 Apr 2006 08:42:28 +0000 (10:42 +0200)
committerJunio C Hamano <junkio@cox.net>
Fri, 28 Apr 2006 21:28:28 +0000 (14:28 -0700)
Use of uninitialized value in scalar chomp at
./git-annotate.perl line 212, <$kid> chunk 4.

Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
git-annotate.perl

index 9df72a1..a7aab25 100755 (executable)
@@ -208,6 +208,9 @@ sub find_parent_renames {
        while (my $change = <$patch>) {
                chomp $change;
                my $filename = <$patch>;
+               if (!defined $filename) {
+                       next;
+               }
                chomp $filename;
 
                if ($change =~ m/^[AMD]$/ ) {