From 601176854186c1bcc81b3cb4eabf2933d1a61d32 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 1 Apr 2021 17:10:41 +0500 Subject: [PATCH] lei_store: quiet down git user info being unset 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') } -- 2.44.0