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=-3.9 required=3.0 tests=ALL_TRUSTED,AWL,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 022B31F9F3 for ; Thu, 1 Apr 2021 12:10:43 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 4/5] lei_store: quiet down git user info being unset Date: Thu, 1 Apr 2021 17:10:41 +0500 Message-Id: <20210401121042.6456-5-e@80x24.org> In-Reply-To: <20210401121042.6456-1-e@80x24.org> References: <20210401121042.6456-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: lei_store contents aren't intended to become public, so there's no point in nagging users for their email address for git committer information like git does. --- lib/PublicInbox/LeiStore.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index f2aa45bd..8574d736 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -51,8 +51,9 @@ sub git_epoch_max { sub git_ident ($) { my ($git) = @_; - chomp(my $i = $git->qx(qw(var GIT_COMMITTER_IDENT))); - warn "$git->{git_dir} GIT_COMMITTER_IDENT failed\n" if $?; + my $rdr = {}; + open $rdr->{2}, '>', '/dev/null' or die "open /dev/null: $!"; + chomp(my $i = $git->qx([qw(var GIT_COMMITTER_IDENT)], undef, $rdr)); $i =~ /\A(.+) <([^>]+)> [0-9]+ [-\+]?[0-9]+$/ ? ($1, $2) : ('lei user', 'x@example.com') }