about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiStore.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/LeiStore.pm')
-rw-r--r--lib/PublicInbox/LeiStore.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm
index a23efed5..7c62ffea 100644
--- a/lib/PublicInbox/LeiStore.pm
+++ b/lib/PublicInbox/LeiStore.pm
@@ -54,7 +54,9 @@ sub git_epoch_max  {
 
 sub git_ident ($) {
         my ($git) = @_;
-        chomp(my $i = $git->qx(qw(var GIT_COMMITTER_IDENT)));
+        open my $null, '>', '/dev/null' or die "open /dev/null: $!";
+        my $opt = { 2 => $null };
+        chomp(my $i = $git->qx(qw(var GIT_COMMITTER_IDENT), undef, $opt));
         warn "$git->{git_dir} GIT_COMMITTER_IDENT failed\n" if $?;
         $i =~ /\A(.+) <([^>]+)> [0-9]+ [-\+]?[0-9]+$/ ? ($1, $2) :
                 ('lei user', 'x@example.com')