diff options
author | Eric Wong <e@80x24.org> | 2020-12-31 19:20:59 -1400 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-01 20:55:31 +0000 |
commit | 171a9c24022ad7efef9248fc51fc357eed6aeb8a (patch) | |
tree | 7501b50755de45f76f42063fd4d5b698b592fe9c /lib/PublicInbox/LeiStore.pm | |
parent | af0b0fb7a454470a32c452119d0392e0dedb3fe1 (diff) | |
download | public-inbox-171a9c24022ad7efef9248fc51fc357eed6aeb8a.tar.gz |
$git->qx and $git->popen now $env and $opt for redirects like lower-level popen_rd. This may be beneficial in other places.
Diffstat (limited to 'lib/PublicInbox/LeiStore.pm')
-rw-r--r-- | lib/PublicInbox/LeiStore.pm | 4 |
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') |