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.
sub git_ident ($) {
my ($git) = @_;
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')
}
$i =~ /\A(.+) <([^>]+)> [0-9]+ [-\+]?[0-9]+$/ ? ($1, $2) :
('lei user', 'x@example.com')
}