about summary refs log tree commit homepage
path: root/lib/PublicInbox/RepoTree.pm
DateCommit message (Collapse)
2024-05-09treewide: reduce $PATH checks for `git' executable
Repeatedly checking $PATH for `git' when we need to call it multiple times in quick succession doesn't seem useful. So avoid some expensive stat(2) syscalls to make things less bad for systems which require expensive CPU vulnerability mitigations. This also saves a bunch of memory allocations since we do the $PATH lookup in pure Perl to avoid doing the uncacheable lookup in a vfork-ed child.
2023-10-09www_coderepo: fix handling of non-UTF-8 git data
We can't assume git output is UTF-8, and we'll always have legacy data in git coderepos. So attempt to display some some garbled text rather than nothing at all if Perl croaks on it. sox commit c38987e8d20505621b8d872863afa7d233ed1096 (Added raw inverse-bit u-law and A-law support. Updated *.txt files., 2001-12-13) is an example of a commit which caused problems for me.
2023-04-29git: make check_async callbacks identical to cat_async
This simplifies Git->cat_async_step and fixes Git->async_abort, the latter of which was passing arguments improperly for the --batch-check (or `info') case at the cost of making the few check_async callers handle an extra argument. The extra (PublicInbox::Git) $self argument for check_async callbacks is now gone, as avoiding the temporary cyclic reference doesn't seem worthwhile since the temporary cyclic reference appears in the ->cat_async code paths, too.
2023-01-28www_coderepo: tree: quiet and 404 on non-existent refs
Clients should see 404s when attempting to hit files for deleted branches or tags.
2023-01-24www_coderepo: eliminate debug log footer
WwwCoderepo is for viewing blobs already in code repositories, so there's no place for a debug log showing which mails were used to arrive at a given blob. The debug footer remains for /$INBOX/$OID/s/ URLs, of course.
2023-01-24viewvcs: prepopulate search bar with dfpost + dfn
I'm not sure if this will get overlooked by users, but maybe it can serve as a hint...
2023-01-13coderepo: consolidate git --batch-check users
And another opportunity to simplify our code between different PSGI-ish implementations. The snapshot retrieval is simpler, but potentially slower since we waste cycles scanning for tags even after we've found one. It's probably not a big deal since it's only short info lines and we can utilize pipelining.
2023-01-13www_coderepo: tree: do not break #n$LINENO
We can't use 302 redirects at the /tree/ endpoint as originally intended since "#n$LINENO" fragment links aren't preserved across redirects (since clients don't typically send that part of the URL in requests). So we'll have to make sure we handle prefixes properly and show trees directly. Oh well :< At least the history-aware 404 handling remains :>
2023-01-13www_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.
2023-01-13www_coderepo: /tree/ redirects to /$OID/s/
This is for compatibility with cgit to ease migration.