diff options
author | Eric Wong <e@80x24.org> | 2017-01-26 04:27:02 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-01-26 07:55:23 +0000 |
commit | c3288fb27efcca73ba87e27c2c2b41b4a1dfbd46 (patch) | |
tree | a4afdc4f8aefc341ad5bbc6c5f7495592e6183c0 /lib/PublicInbox/RepobrowseGitCommit.pm | |
parent | 9877e27be55f7a8d00a613630875d647d97d7bb3 (diff) | |
download | public-inbox-c3288fb27efcca73ba87e27c2c2b41b4a1dfbd46.tar.gz |
This shortens the code quite a bit at a negligible performance cost, and the diffstat agrees.
Diffstat (limited to 'lib/PublicInbox/RepobrowseGitCommit.pm')
-rw-r--r-- | lib/PublicInbox/RepobrowseGitCommit.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/RepobrowseGitCommit.pm b/lib/PublicInbox/RepobrowseGitCommit.pm index 328d2d40..6eadd2e5 100644 --- a/lib/PublicInbox/RepobrowseGitCommit.pm +++ b/lib/PublicInbox/RepobrowseGitCommit.pm @@ -131,10 +131,9 @@ sub call_git_commit { # RepobrowseBase calls this } my $git = $req->{repo_info}->{git}; - my $cmd = [ 'git', "--git-dir=$git->{git_dir}", qw(show - -z --numstat -p --encoding=UTF-8 + my $cmd = $git->cmd(qw(show -z --numstat -p --encoding=UTF-8 --no-notes --no-color -c), - $git->abbrev, GIT_FMT, $id, '--' ]; + $git->abbrev, GIT_FMT, $id, '--'); my $rdr = { 2 => $git->err_begin }; my $qsp = PublicInbox::Qspawn->new($cmd, undef, $rdr); $req->{'q'} = $q; |