X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FViewVCS.pm;h=3b4fa393ed3ff16436db04a0dc3259d62825edbf;hb=35b7adee1f01a7cce720d944e1666aa44717d024;hp=0a38f9dee7e5d3126264e2013a7dfb4ca58b13be;hpb=03c93202f18e117bad325f35c8e78f1827be72f5;p=public-inbox.git diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 0a38f9de..3b4fa393 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -179,19 +179,19 @@ title="list contemporary emails">$2) $_ = qq().shift(@$p).' '.shift(@$pt) for @$P; if (@$P == 1) { $x = qq{ (patch)\n parent $P->[0]}; +href="$f.patch">patch)\n parent $P->[0]}; } elsif (@$P > 1) { - $x = qq(\n parents $P->[0]\n); + $x = qq(\n parents $P->[0]\n); shift @$P; $x .= qq( $_\n) for @$P; chop $x; } else { - $x = ' (root commit)'; + $x = ' (root commit)'; } PublicInbox::WwwStream::html_init($ctx); $ctx->zmore(< commit $H$x - tree $T +
   commit $H$x
+     tree $T
    author $au
 committer $co
 
@@ -238,7 +238,24 @@ id=related>
find related emails, including ancestors/descendants/conflicts
 EOM
 		}
 	}
-	$x = $ctx->zflush($ctx->_html_end);
+	chop($x = <
glossary
+--------
+Commit objects reference one tree, and zero or more parents.
+
+Single parent commits can typically generate a patch in
+unified diff format via `git format-patch'.
+
+Multiple parents means the commit is a merge.
+
+Root commits have no ancestor.  Note that it is
+possible to have multiple root commits when merging independent histories.
+
+Every commit references one top-level tree object.
+EOM + $x = $ctx->zflush($x, $ctx->_html_end); my $res_hdr = delete $ctx->{-res_hdr}; push @$res_hdr, 'Content-Length', length($x); delete($ctx->{env}->{'qspawn.wcb'})->([200, $res_hdr, [$x]]); @@ -398,7 +415,7 @@ sub solve_result { return stream_large_blob($ctx, $res) if defined $ctx->{fn}; return html_page($ctx, 200, <Too big to show, download available -"$oid $type $size bytes $raw_link
+blob $oid $size bytes $raw_link
EOM } @@ -417,7 +434,7 @@ EOM } $bin and return html_page($ctx, 200, - "
$oid $type $size bytes (binary)" .
+				"
blob $oid $size bytes (binary)" .
 				" $raw_link
".dbg_log($ctx)); # TODO: detect + convert to ensure validity @@ -433,7 +450,7 @@ EOM $$blob = ascii_html($$blob); } - my $x = "
$oid $type $size bytes $raw_link
" . + my $x = "
blob $oid $size bytes $raw_link
" . "
". "
";
 	$x .= sprintf("% ${pad}u\n", $_) for (1..$nl);