From c3288fb27efcca73ba87e27c2c2b41b4a1dfbd46 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 26 Jan 2017 04:27:02 +0000 Subject: repobrowse: simplify command generation for git commands This shortens the code quite a bit at a negligible performance cost, and the diffstat agrees. --- lib/PublicInbox/RepobrowseGitSummary.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/RepobrowseGitSummary.pm') diff --git a/lib/PublicInbox/RepobrowseGitSummary.pm b/lib/PublicInbox/RepobrowseGitSummary.pm index f571a4f5..b6b96028 100644 --- a/lib/PublicInbox/RepobrowseGitSummary.pm +++ b/lib/PublicInbox/RepobrowseGitSummary.pm @@ -16,7 +16,7 @@ sub call_git_summary { # n.b. we would use %(HEAD) in for-each-ref --format if we could # rely on git 1.9.0+, but it's too soon for that in early 2017... - my $cmd = [ 'git', "--git-dir=$git->{git_dir}", qw(symbolic-ref HEAD) ]; + my $cmd = $git->cmd(qw(symbolic-ref HEAD)); my $rdr = { 2 => $git->err_begin }; my $qsp = PublicInbox::Qspawn->new($cmd, undef, $rdr); sub { -- cgit v1.2.3-24-ge0c7