From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id EC8821FA36 for ; Tue, 24 Jan 2023 09:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1674553806; bh=91Sc57h6wYG/7e4kLl/r/YUFiKOV794bSy55uftmjlc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HQoFnTI2Ibu/hueLyMoRwLHbsjz/NuXF7qFJk/vaEQ0y5EhCmgsuIhGx8zGv0AZ2U NykaXMZXhyKiAFI5jBQ4J/bsBDyagiEc7l5mkQRlyXx1K0KqMD0u6NZj6T0JD1WNBF Upda+NFKGyYUmwrDkXmuFep33pFp4zosjP1NNDjE= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 11/11] viewvcs: improve tree glossary view Date: Tue, 24 Jan 2023 09:49:40 +0000 Message-Id: <20230124094940.572017-12-e@80x24.org> In-Reply-To: <20230124094940.572017-1-e@80x24.org> References: <20230124094940.572017-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Adding an
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. --- lib/PublicInbox/ViewVCS.pm | 10 +++++++--- 1 file 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[ (path 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 @ commit$oid"; + $gitlink = 1; next; } my $q = 'b='.ascii_html(uri_escape_path($pfx.$f)); @@ -430,17 +431,20 @@ EOM } $$bref .= dbg_log($ctx); $$bref .= <glossary +
glossary
 --------
 Tree 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.
 
 Path 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 .= <Commit objects may be stored in trees to reference submodules.