From: Kay Sievers Date: Sun, 7 Aug 2005 17:56:59 +0000 (+0200) Subject: v004 X-Git-Tag: v1.4.0~1^2~138 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=22fafb99e37d5b8b4f8ef57b9d09f233a7efa40a;p=git.git v004 --- diff --git a/gitweb.pl b/gitweb.pl index dafd687e..09e0eca7 100755 --- a/gitweb.pl +++ b/gitweb.pl @@ -1,5 +1,9 @@ #!/usr/bin/perl +# gitweb.pl - simple web interface to track changes in git repositories +# +# Version 004 +# # This file is licensed under the GPL v2, or a later version # (C) 2005, Kay Sievers # (C) 2005, Christian Gierke @@ -234,6 +238,7 @@ if ($action eq "blob") { print "\n"; print "\n"; foreach my $rev (reverse sort @revtree) { + # '1114106118 755e3010ee10dadf42a8a80770e1b115fb038d9b:1 2af17b4854036a1c2ec6c101d93c8dd1ed80d24e:1' last if !($rev =~ m/^([0-9]+) ([0-9a-fA-F]+).* ([0-9a-fA-F]+)/); my $time = $1; my $commit = $2; @@ -306,7 +311,7 @@ if ($action eq "blob") { print "\n"; print "\n"; print "\n"; @@ -336,7 +341,7 @@ if ($action eq "blob") { git_header(); print "
\n"; - print "view " . $cgi->a({-href => "$myself?project=$project;action=diffs;hash=$hash;parent=$parent"}, "diff") . "

\n"; + print "view " . $cgi->a({-href => "$myself?project=$project;action=treediff;hash=$hash;parent=$parent"}, "diff") . "

\n"; print "
\n";
 	foreach my $line (@difftree) {
 		# '*100644->100644	blob	9f91a116d91926df3ba936a80f020a6ab1084d2b->bb90a0c3a91eb52020d0db0e8b4f94d30e02d596	net/ipv4/route.c'
@@ -371,7 +376,7 @@ if ($action eq "blob") {
 	print "
\n"; print "
"; git_footer(); -} elsif ($action eq "diffs") { +} elsif ($action eq "treediff") { open my $fd, "-|", "$gitbin/diff-tree", "-r", $parent, $hash; my (@difftree) = map { chomp; $_ } <$fd>; close $fd;
"; - print $cgi->a({-href => "$myself?project=$project;action=diffs;hash=$commit;parent=$parent"}, "view diff") . "
\n"; + print $cgi->a({-href => "$myself?project=$project;action=treediff;hash=$commit;parent=$parent"}, "view diff") . "
\n"; print $cgi->a({-href => "$myself?project=$project;action=commit;hash=$commit;parent=$parent"}, "view commit") . "
\n"; print $cgi->a({-href => "$myself?project=$project;action=tree;hash=$tree"}, "view tree") . "
\n"; print "