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 95AAD1F47C for ; Thu, 12 Jan 2023 14:14:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1673532888; bh=uTMpqlDPh5iiQUe8l3DkVrq2Iq7RBabkJBN0n4WOv9Q=; h=From:To:Subject:Date:From; b=wkqtYVsnmjKMu6kups4aNDDy+9H0FMhtxRBkGeJ2nT5EYSWOZcUvSra/4U9HsaLdz lYhMxo7f9cwzeVVox9Lj5fy44EmAVbnzsFmnXaV1JoniqofQuXDCdH4QbnpAIEooqd XO/04P6tiEfcNbdH5OD7Nc9f4Uf+JHsHDc1/riPM= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 0/3] coderepo: cgit-compatible /tree/ redirect Date: Thu, 12 Jan 2023 14:14:32 +0000 Message-Id: <20230112141435.1924376-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: I much prefer $REPO/$OID/s/ URLs since they're stable, but we'll need to handle /tree/ when migrating from cgit. 3/3 adds some git-aware 404 handling for deleted||renamed files; hopefully it's not too expensive. It might be a first... For example, a recent deletion: https://80x24.org/lore/pub/scm/git/git.git/tree/git-bisect.sh vs. one from 2005: https://80x24.org/lore/pub/scm/git/git.git/tree/Documentation/git-mkdelta.txt Eric Wong (3): www_stream: coderepo-specific top bar www_coderepo: /tree/ redirects to /$OID/s/ www_coderepo: /tree/ 404s search git history MANIFEST | 1 + lib/PublicInbox/GitAsyncCat.pm | 2 +- lib/PublicInbox/RepoTree.pm | 84 ++++++++++++++++++++++++++++++++++ lib/PublicInbox/ViewVCS.pm | 23 ++++++---- lib/PublicInbox/WwwCoderepo.pm | 15 +++--- lib/PublicInbox/WwwStream.pm | 53 ++++++++++++++++++++- t/solver_git.t | 7 +++ 7 files changed, 167 insertions(+), 18 deletions(-) create mode 100644 lib/PublicInbox/RepoTree.pm