lib/PublicInbox/ViewVCS.pm | 29 +++++++++++++++++++++++------ diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 0a38f9dee7e5d3126264e2013a7dfb4ca58b13be..6b6b94fbe378620679186d065272bb04953eaf34 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -179,19 +179,19 @@ my ($P, $p, $pt) = delete @$ctx{qw(-cmt_P -cmt_p -cmt_pt)}; $_ = 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 @@ />\t(help)
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]]);