about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-01 17:10:41 +0500
committerEric Wong <e@80x24.org>2021-04-01 18:25:15 +0000
commit601176854186c1bcc81b3cb4eabf2933d1a61d32 (patch)
tree332f6a45c2a9f729cfcfd7ee6cbc3e28ca0a6376
parent4a132f960e04201bcf4dcc06eb34d9c47ec13457 (diff)
downloadpublic-inbox-601176854186c1bcc81b3cb4eabf2933d1a61d32.tar.gz
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.
-rw-r--r--lib/PublicInbox/LeiStore.pm5
1 files 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')
 }