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/RepobrowseGitTree.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/RepobrowseGitTree.pm')
-rw-r--r-- | lib/PublicInbox/RepobrowseGitTree.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/RepobrowseGitTree.pm b/lib/PublicInbox/RepobrowseGitTree.pm index a2e38017..c242fd1a 100644 --- a/lib/PublicInbox/RepobrowseGitTree.pm +++ b/lib/PublicInbox/RepobrowseGitTree.pm @@ -189,8 +189,7 @@ sub git_tree_sed ($) { sub git_tree_show { my ($req, $hex, $q) = @_; my $git = $req->{repo_info}->{git}; - my $cmd = [ 'git', "--git-dir=$git->{git_dir}", qw(ls-tree -l -z), - $git->abbrev, $hex ]; + my $cmd = $git->cmd(qw(ls-tree -l -z), $git->abbrev, $hex); my $rdr = { 2 => $git->err_begin }; my $qsp = PublicInbox::Qspawn->new($cmd, undef, $rdr); my $t = cur_path($req, $q); |