Date | Commit message (Collapse) |
|
We need to ensure we've fully-drained the pipe before
signalling EOF to the callback, since pipelining may
not be the best choice with detachable processes
in the future.
|
|
Ending up with potentially ambiguous identifiers in the
future is not worth saving some bytes, in this case.
|
|
This will allow most source files to be displayed without
blocking public-inbox-httpd on slow disk access. However, we no
longer support displaying source files larger than 65536 bytes
(the size of a pipe on current Linux).
|
|
We don't actually know what context we'll be called under,
so detecting the mere use-ability of Danga::Socket is not
sufficient.
|
|
This shortens the code quite a bit at a negligible performance cost,
and the diffstat agrees.
|
|
This wrapper class actually does both reading and
writing, and a shorter name is nicer.
|
|
This will allow us to handle network operations while waiting
on "git cat-file" to seek and unpack things.
|
|
We may not keep this feature after all, but for now we'll hold
off on creating it to cheapen instantiation.
|
|
* origin/repobrowse: (98 commits)
t/repobrowse_git_httpd.t: ensure signature exists for split
t/repobrowse_git_tree.t: fix test for lack of bold
repobrowse: fix alignment of gitlink entries
repobrowse: show invalid type for tree views
repobrowse: do not bold directory names in tree view
repobrowse: reduce checks for response fh
repobrowse: larger, short-lived buffer for reading patches
repobrowse: reduce risk of callback reference cycles
repobrowse: snapshot support for cgit compatibility
test: disable warning for Plack::Test::Impl
repobrowse: avoid confusing linkification for "diff"
repobrowse: git commit view uses pi-httpd.async
repobrowse: more consistent variable naming for /commit/
repobrowse: show roughly equivalent "diff-tree" invocation
repobrowse: reduce local variables for state management
repobrowse: summary handles multiple README types
repobrowse: remove bold decorations from diff view
repobrowse: common git diff parsing code
repobrowse: implement diff view for compatibility
examples/repobrowse.psgi: disable Chunked response by default
...
|
|
We must ensure cat-file process is launched before Xapian
grabs lock, too. Our use of "git cat-file --batch" has
the same problem as "git log" did, (which was fixed in
commit 3713c727cda431a0dc2865a7878c13ecf9f21851)
"searchidx: release Xapian FDs before spawning git log"
|
|
fork failures are unfortunately common when Xapian has
gigabytes and gigabytes mmapped.
|
|
This hopefully makes the intent of the code clearer, too.
The the HTTP use of the numeric reference for getline
caused problems in Git.pm, already.
|
|
This allows us to easily provide gigantic inboxes
with proper backpressure handling for slow clients.
It also eliminates public-inbox-httpd and Danga::Socket-specific
knowledge from this class, making it easier to follow for
those used to generic PSGI applications.
|
|
This is probably trivial enough to be final?
|
|
This lets us one-line git commands easily like ``, but without
having to remember --git-dir or escape arguments.
|
|
This should allow us to avoid polluting stderr output when
HTTP clients inevitably request broken revisions.
|
|
We want to be able to redirect stderr to a temporary file
while using the normal popen interface in our Git.pm.
|
|
We will use core.abbrev=12 by default if unset, as the git
default of 7 is too low for long-term usability of links.
Some of our callers used 16, which was probably excessive.
|
|
This lets us one-line git commands easily like ``, but without
having to remember --git-dir or escape arguments.
|
|
We may be setting $/ elsewhere, so do not let our callers
inadvertantly break us.
|
|
Unfortunately, it seems being able to handle callbacks is
insufficient; and these methods will allow us to avoid making
an extra $git->check call.
|
|
This metadata can be useful on an optional basis; allowing
calls to $git->check to be skipped.
|
|
We can rely on timely auto-destruction based on reference
counting; reducing the chance of redundant close(2) calls
which may hit the wront FD.
We do care about certain close calls (e.g. writing to a buffered
IO handle) if we require error-checking for write-integrity. In
other cases, let things go out-of-scope so it can be freed
automatically after use.
|
|
This should reduce overhead of spawning git processes
from our long-running httpd and nntpd servers.
|
|
We'll be using it for more than just cat-file.
Adding a `popen' API for internal use allows us to save a bunch
of code in other places.
|