From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id DD8D31F4C8 for ; Mon, 28 Oct 2019 10:45:29 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 04/14] learn: GIT_COMMITTER_ may be "" or "0" Date: Mon, 28 Oct 2019 10:45:18 +0000 Message-Id: <20191028104528.10140-5-e@80x24.org> In-Reply-To: <20191028104528.10140-1-e@80x24.org> References: <20191028104528.10140-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Users may be zeroes or blanks. --- script/public-inbox-learn | 4 ++-- 1 file 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);