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/RepobrowseGitDiff.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/RepobrowseGitDiff.pm')
-rw-r--r-- | lib/PublicInbox/RepobrowseGitDiff.pm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/PublicInbox/RepobrowseGitDiff.pm b/lib/PublicInbox/RepobrowseGitDiff.pm index eb64d1fd..e2b7179f 100644 --- a/lib/PublicInbox/RepobrowseGitDiff.pm +++ b/lib/PublicInbox/RepobrowseGitDiff.pm @@ -40,10 +40,8 @@ sub call_git_diff { my $id2 = $q->{id2}; my $git = $req->{repo_info}->{git}; - my $cmd = [ 'git', "--git-dir=$git->{git_dir}", qw(diff-tree - -z --numstat -p --encoding=UTF-8 - --no-color -M -B -D -r), - $id2, $id, '--' ]; + my $cmd = $git->cmd(qw(diff-tree -z --numstat -p --encoding=UTF-8 + --no-color -M -B -D -r), $id2, $id, '--'); my $expath = $req->{expath}; push @$cmd, $expath if $expath ne ''; my $o = { nofollow => 1, noindex => 1 }; |