about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-10-28 10:45:18 +0000
committerEric Wong <e@80x24.org>2019-10-30 08:48:11 +0000
commitb1e4d474efcccaa5c5b5e71aac75c8f7836f1d91 (patch)
tree977fbaa560c0bd607744b02363cd62478cfa9090
parentec294cdbc5392fdb136572dbcedb250798023703 (diff)
downloadpublic-inbox-b1e4d474efcccaa5c5b5e71aac75c8f7836f1d91.tar.gz
learn: GIT_COMMITTER_<NAME|EMAIL> may be "" or "0"
Users may be zeroes or blanks.
-rwxr-xr-xscript/public-inbox-learn4
1 files changed, 2 insertions, 2 deletions
diff --git a/script/public-inbox-learn b/script/public-inbox-learn
index ad132985..299f75a0 100755
--- a/script/public-inbox-learn
+++ b/script/public-inbox-learn
@@ -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);