Date | Commit message (Collapse) |
|
This is redundant with the "raw" endpoint.
|
|
This is shorter, and makes more sense as the endpoint
displays both tree listings and actual blob sources.
This will also make rewriting existing URLs from cgit
installations easier.
|
|
Revisions passed in the URL must not be ignored.
This fixes some bugs introduced in commit
f6244586ba4f5a5e7575e1254be8c9bbe303fce9
("repobrowse: switch to new URL format to avoid query strings")
|
|
We do not need specialized trailing slashes if we break URL
compatibility from cgit, here. Removing trailing (and redundant)
slashes improves our hit rates with across both server-side
(varnish, squid) and client-side (browser) layers.
|
|
Avoid using '=>' arrow notation for arrays and array references,
it is confusing and more verbose. Additionally, combine
"use constant" statements when possible.
|
|
We do not need to escape URIs in this file.
|
|
This name is shorter and matches terminology in gitweb and
other popular git web viewers.
|
|
The "HEAD" symbolic ref is rarely changed, so
memoize it for now and avoid exposing it in URLs.
|
|
This makes it more consistent with how we use the Inbox
objects for the main code.
|
|
Query strings make endpoint caching more difficult since
they're order-independent. They are also more likely lost
or truncated inadvertantly when copy+pasting, so try to
avoid them for default endpoints.
There's still some things which are broken and followup
commits will be needed to fix them.
|
|
PSGI specs already require PATH_INFO to be unescaped.
Followup-to: commit 364de65f8a6b5729027cb70228312a141430122f
("www: do not unescape PATH_INFO twice")
|
|
We'll still be keeping "repobrowse" for the public API
for use with .psgi files, but shortening the name means
less typing and we may have command-line tools, too.
|
|
Metaprogramming can be difficult-to-read after several
months, so leave comments in place to describe common
usage results of.
|
|
This does not make installation easier, but lightens runtime a
bit. Plack::Request is unnecessary bloat and indirection which
does things behind our back. $env has all the stuff we need.
|
|
* 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 currently do not display links to snapshots, but may in the
future (optionally, like cgit). However, support snapshots for
compatibility reasons in case people had cached URLs or
auto-generated them somewhere.
We won't natively support xz and bzip2 just yet, but will
document (at least in comments) how to enable these expensive
compression schemes via git-config(1). Also, support disabling
certain archive types to twart URL guessing or old cached links
from spiders burning bandwidth.
In retrospect, enabling snapshots for my own cgit views was a
bad idea since it wastes bandwidth from crawlers and is
is often not useful for users with maintainer-built files
(e.g. "configure" from "configure.ac" for autoconf, where
only the latter is stored in git and the former is
generated in release tarballs).
|
|
This needs to be cleaned up, but we shall support the
(potentially very expensive) diff view between arbitrary
revisions to avoid breaking existing URLs.
The diff parsing code will need to be consolidated
between this and the commit view.
|
|
This allows RepobrowseConfig objects to passed directly
to Repobrowse initialization, similar to the way the normal
Config can be passed to WWW at initialization.
|
|
Make it closer to what the existing WWW interface is since
we no longer rely on CGI.pm
|
|
We can reuse the existing code for cloning ssoma repositories
to serve normal git repos for repobrowse.
Also, this finally adds a test to fallback to dumb cloning when
http.uploadPack is disabled for the git repository to save
CPU/memory on the host machine.
|
|
Mostly following cgit, except we do not serve redundant
text-only output which wastes bandwidth and doesn't preserve
pre-formatting layout which is critical to some messages.
|
|
We already dropped CGI from the master branch, drop it from
repobrowse as well to simplify code.
|
|
We need to preserve the query string to avoid breakage.
|
|
Sometimes; people like to advertise projects and group them.
Of course, "-hidden" is a valid group for projects which do
not want to be advertised.
|
|
For human-visible HTML pages, avoid the trailing slash as that
can reduce cache hits in both the server (using varnish) and
clients. Typical web browsers are all capable of following
301 redirects without difficulty or human interaction.
We do not redirect for endpoints which may be consumed by
automated tools as that may cause compatibility problems. For
example, curl(1) does not automatically follow redirects and
needs the "-L" flag to do so.
|
|
This should provide a decent landing page for projects.
Alternative README files may be configured with the per-repo
"readme" directive.
|
|
We mainly call it "repobrowse" (all lowercase), so do not imply
it is two separate words by capitalizing "Browse".
|