]> Sergey Matveev's repositories - public-inbox.git/blobdiff - script/public-inbox-learn
learn: GIT_COMMITTER_<NAME|EMAIL> may be "" or "0"
[public-inbox.git] / script / public-inbox-learn
index ad1329859ce253304507046547667ad21c45464e..299f75a0e58ae319d6e46ee068db1f20c1af10dd 100755 (executable)
@@ -65,8 +65,8 @@ if ($train eq 'spam') {
                next unless ref($dst);
                # We do not touch GIT_COMMITTER_* env here so we can track
                # who trained the message.
-               $dst->{name} = $ENV{GIT_COMMITTER_NAME} || $dst->{name};
-               $dst->{-primary_address} = $ENV{GIT_COMMITTER_EMAIL} || $addr;
+               $dst->{name} = $ENV{GIT_COMMITTER_NAME} // $dst->{name};
+               $dst->{-primary_address} = $ENV{GIT_COMMITTER_EMAIL} // $addr;
                $dst = PublicInbox::InboxWritable->new($dst);
                my $im = $dst->importer(0);