about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-01-24 09:49:40 +0000
committerEric Wong <e@80x24.org>2023-01-24 10:07:57 +0000
commita1a14e4db59351d6dc7727186d381ec3c0bd9bb6 (patch)
tree2c1a819527aceaa0a5a6e367cf52239cf299d364
parentc89ee98efc39c94aed0f38aa3c334c571d1a7073 (diff)
downloadpublic-inbox-a1a14e4db59351d6dc7727186d381ec3c0bd9bb6.tar.gz
Adding an <hr> helps delineate the glossary, note that
submodules are rare, and avoid needlessly defining the
commits-in-trees case since the extra information is likely
to overwhelm new users.
-rw-r--r--lib/PublicInbox/ViewVCS.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm
index 99f5e24f..5fd46610 100644
--- a/lib/PublicInbox/ViewVCS.pm
+++ b/lib/PublicInbox/ViewVCS.pm
@@ -409,7 +409,7 @@ EOM
                 $pfx = '';
                 $$bref .= qq[  (<a href=#path>path</a> unknown)\n];
         }
-        my ($x, $m, $t, $oid, $sz, $f, $n);
+        my ($x, $m, $t, $oid, $sz, $f, $n, $gitlink);
         $$bref .= "\n        size        name";
         for (@ent) {
                 ($x, $f) = split(/\t/, $_, 2);
@@ -420,6 +420,7 @@ EOM
                 $n = ascii_html($f);
                 if ($m eq 'g') { # gitlink submodule commit
                         $$bref .= "\ng\t\t$n @ <a\nhref=#g>commit</a>$oid";
+                        $gitlink = 1;
                         next;
                 }
                 my $q = 'b='.ascii_html(uri_escape_path($pfx.$f));
@@ -430,17 +431,20 @@ EOM
         }
         $$bref .= dbg_log($ctx);
         $$bref .= <<EOM;
-<pre>glossary
+<hr><pre>glossary
 --------
 <dfn
 id=tree>Tree</dfn> objects belong to commits or other tree objects.  Trees may
-reference blobs, sub-trees, or commits of submodules.
+reference blobs, sub-trees, or (rarely) commits of submodules.
 
 <dfn
 id=path>Path</dfn> names are stored in tree objects, but trees do not know
 their own path name.  A tree's path name comes from their parent tree,
 or it is the root tree referenced by a commit object.  Thus, this web UI
 relies on the `b=' URI parameter as a hint to display the path name.
+EOM
+
+        $$bref .= <<EOM if $gitlink;
 
 <dfn title="submodule commit"
 id=g>Commit</dfn> objects may be stored in trees to reference submodules.</pre>