diff options
Diffstat (limited to 'local/post-receive.gentoo-commits')
-rwxr-xr-x | local/post-receive.gentoo-commits | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/local/post-receive.gentoo-commits b/local/post-receive.gentoo-commits index 040dda4..954b416 100755 --- a/local/post-receive.gentoo-commits +++ b/local/post-receive.gentoo-commits @@ -419,12 +419,17 @@ sub get_data($) { } # Committer already got its data from the key metadata # but in case there went something wrong.. - if ((!$data{"committer_email"} || !$data{"committer_realname"} || !$data{"committer"}) && $field eq "committer") { - warn("Warning: falling back to legacy committer detection as no or not enough metadata was provided"); - $data{"committer_email"} = pop(@fields); - $data{"committer_email"} =~ s/[<>]//g; - $data{"committer_realname"} = join(" ", @fields); - $data{"committer"} = $data{"committer_realname"}." <".$data{"committer_email"}.">"; + if($field eq "committer") { + if (!$data{"committer_email"} || !$data{"committer_realname"} || !$data{"committer"}) { + { + no warnings 'uninitialized'; + warn("Warning: falling back to legacy committer detection as no or not enough metadata was provided committer_email=$committer_email committer_realname=$committer_realname committer=$committer"); + } + $data{"committer_email"} = pop(@fields); + $data{"committer_email"} =~ s/[<>]//g; + $data{"committer_realname"} = join(" ", @fields); + $data{"committer"} = $data{"committer_realname"}." <".$data{"committer_email"}.">"; + } } } else { |