From: Kay Sievers Date: Sun, 7 Aug 2005 17:56:10 +0000 (+0200) Subject: v003 X-Git-Tag: v1.4.0~1^2~140 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c068cff1f95c68f29cb514d5be7b9ddcbd28d824;p=git.git v003 --- diff --git a/gitweb.pl b/gitweb.pl index b13f75c21..b0efd7cda 100755 --- a/gitweb.pl +++ b/gitweb.pl @@ -57,7 +57,9 @@ print <===== '; + if ($old ne "") { + print $cgi->a({-href => "$myself?project=$project&action=blob&hash=$old"}, $old); + } else { + print $old_name; + } + print " vs "; + if ($new ne "") { + print $cgi->a({-href => "$myself?project=$project&action=blob&hash=$new"}, $new); + } else { + print $new_name; + } + print ' ====='; while (my $line = <$fd>) { my $char = substr($line,0,1); print '
' if $char eq '+'; print '
' if $char eq '-'; - print '
' if $char eq '@'; + print '
' if $char eq '@'; print escapeHTML($line); print '
' if $char eq '+' or $char eq '-' or $char eq '@'; } close $fd; - #unlink("$gittmp/$new"); - #unlink("$gittmp/$old"); + unlink("$gittmp/$new"); + unlink("$gittmp/$old"); } if ($project eq "") { @@ -185,6 +200,7 @@ if ($action eq "blob") { print "

\n"; print "
\n";
 	foreach my $line (@entries) {
+		#'100644	blob	0fa3f3a66fb6a137f6ec2c19351ed4d807070ffa	panic.c'
 		$line =~ m/^([0-9]+)\t(.*)\t(.*)\t(.*)$/;
 		my $t_type = $2;
 		my $t_hash = $3;
@@ -322,6 +338,8 @@ if ($action eq "blob") {
 	print "

\n"; print "
\n";
 	foreach my $line (@difftree) {
+		# '*100644->100644	blob	9f91a116d91926df3ba936a80f020a6ab1084d2b->bb90a0c3a91eb52020d0db0e8b4f94d30e02d596	net/ipv4/route.c'
+		# '+100644	blob	4a83ab6cd565d21ab0385bac6643826b83c2fcd4	arch/arm/lib/bitops.h'
 		$line =~ m/^(.)(.*)\t(.*)\t(.*)\t(.*)$/;
 		my $op = $1;
 		my $mode = $2;
@@ -361,6 +379,7 @@ if ($action eq "blob") {
 	print "

\n"; print "
\n";
 	foreach my $line (@difftree) {
+		# '*100644->100644	blob	8e5f9bbdf4de94a1bc4b4da8cb06677ce0a57716->8da3a306d0c0c070d87048d14a033df02f40a154	Makefile'
 		$line =~ m/^(.)(.*)\t(.*)\t(.*)\t(.*)$/;
 		my $op = $1;
 		my $mode = $2;
@@ -377,7 +396,6 @@ if ($action eq "blob") {
 				git_diff($file, $file, $1, $2);
 			}
 		}
-		print "
\n"; } print "
\n"; print "
";