Skip to contentSkip to conversation

annotate: fix warning about uninitialized scalar

PATCH New Matthias Kestenholz 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 annotate: fix warning about uninitialized scalar

Use of uninitialized value in scalar chomp at
./git-annotate.perl line 212, <$kid> chunk 4.

---

 git-annotate.perl |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

5322aefa820eef2d635d5dbf621269aefce52135

git-annotate.perl +3 -0
index bf920a5..5f8a766 100755
@@ -209,6 +209,9 @@ sub find_parent_renames {
 	while (my $change = <$patch>) {
 		chomp $change;
 		my $filename = <$patch>;
+		if(!$filename) {
+			next;
+		}
 		chomp $filename;
 
 		if ($change =~ m/^[AMD]$/ ) {
Signature · 1 line
1.3.1.gc4586