[PATCH 6] gitweb: Correct error from changing "-|" open to list form in git_commit

From: Jakub Narebski <jnareb@gmail.com>
Date: 2006-07-30 12:11:10
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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sun Jul 30 12:11:38 2006

This archive was generated by hypermail 2.1.8 : 2006-07-30 12:12:08 EST