]> Sergey Matveev's repositories - public-inbox.git/commit
www_coderepo: /tree/ 404s search git history
authorEric Wong <e@80x24.org>
Thu, 12 Jan 2023 14:14:35 +0000 (14:14 +0000)
committerEric Wong <e@80x24.org>
Fri, 13 Jan 2023 03:56:29 +0000 (03:56 +0000)
commitd95ddf03cd437d6f5038f2ff21a9ef7efe93b056
tree2d6512137cb666fe952359966410a5bc0fa2551e
parent1c5e51b931fb2a00df28dd5e81d1766b63e389b3
www_coderepo: /tree/ 404s search git history

Displaying git trees over the web with pathnames in the URLs
have the unfortunate consequence of URLs getting out-of-date
if files are renamed or deleted from the latest tree.

We can utilize `git log' here to search history and find the
commit which led to the rename or deletion.  Of course, we'll
show a suitable command to the user as well, another small
step towards covertly teaching users the git CLI :>

`git log' is not especially fast, here, but Qspawn limiters can
do their job and renames and deletions aren't too common in most
codebases.
lib/PublicInbox/RepoTree.pm