Date | Commit message (Collapse) |
|
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.
|
|
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.
|
|
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.
|
|
Clients should see 404s when attempting to hit files for deleted
branches or tags.
|
|
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.
|
|
I'm not sure if this will get overlooked by users, but maybe
it can serve as a hint...
|
|
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.
|
|
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 :>
|
|
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.
|
|
This is for compatibility with cgit to ease migration.
|