[PATCH 6] gitweb: Correct error from changing "-|" open to list form in git_commit
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jul 30, 2006, 02:11 UTC
- Message-ID
- <200607300411.12766.jnareb@gmail.com>
- In-Reply-To
- <200607292239.11034.jnareb@gmail.com>
Correct error in moving to list form of open for running git commands and reading their output through pipe (PATCH 2 in series) in git_commit subroutine.
Signed-off-by: Jakub Narebski <jnareb@gmail.com> --- It also simplifies git_commit a tiny bit.
gitweb/gitweb.cgi | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index e1f0e26..86b9547 100755 --- a/gitweb/gitweb.cgi +++ b/gitweb/gitweb.cgi @@ -1984,16 +1984,14 @@ sub git_commit { my %cd = date_str($co{'committer_epoch'}, $co{'committer_tz'}); my @difftree; - my $root = ""; my $parent = $co{'parent'}; if (!defined $parent) { - $root = " --root"; - $parent = ""; + $parent = "--root"; } - open my $fd, "-|", $GIT, "diff-tree", '-r', '-M', $root, $parent, $hash + open my $fd, "-|", $GIT, "diff-tree", '-r', '-M', $parent, $hash or die_error(undef, "Open git-diff-tree failed."); @difftree = map { chomp; $_ } <$fd>; - close $fd or die_error(undef, "Reading diff-tree failed."); + close $fd or die_error(undef, "Reading git-diff-tree failed."); # non-textual hash id's can be cached my $expires;
-- 1.4.0