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 BF38C1FA2D for ; Tue, 24 Jan 2023 09:50:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1674553804; bh=tCzjbBmv+TXZMiWiuRyialflxN91MmQGopu/WktdYkc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fDWbsxgWZnIQBeHX8ceVxjLEdkXdUE9gBxkebGovoqMoglvLUgs3u027emB8qEUry QRtoQUm28EyLgNnIGpgXV9dvLwRhNeta6KUDFp8h+Y0NMnVvK0sAxi4+maPlDIqZOJ 9FLsfe9uOkSiapvwfW1rBjv6CSXMqfrtIYUCorYw= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 04/11] www_coderepo: show /$INBOX/?t=$DATE link for commits Date: Tue, 24 Jan 2023 09:49:33 +0000 Message-Id: <20230124094940.572017-5-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: While we can't inexpensively search for git commits based on the timestamp, coderepos configured for inboxes can still look up messages based on the inbox URL. --- lib/PublicInbox/ViewVCS.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 51a7bcbc..b238e832 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -208,13 +208,15 @@ sub cmt_finalize { $au =~ s/>/>$x/; } $_ = ascii_html($_) for ($au, $co); + my $ibx_url = ibx_url_for($ctx) // $upfx; $au =~ s!(> +)([0-9]{4,}-\S+ \S+)! my ($gt, $t) = ($1, $2); $t =~ tr/ :-//d; qq($gt$2) !e; + $ctx->{-title_html} = $s = $ctx->{-linkify}->to_html($s); my ($P, $p, $pt) = delete @$ctx{qw(-cmt_P -cmt_p -cmt_pt)}; $_ = qq().shift(@$p).' '.shift(@$pt) for @$P;