about summary refs log tree commit homepage
path: root/lib/PublicInbox/Repobrowse.pm
DateCommit message (Collapse)
2017-03-03repobrowse: remove unused "blob" endpoint
This is redundant with the "raw" endpoint.
2017-03-02repobrowse: rename "tree" endpoint to "src"
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.
2017-02-22repobrowse: fixup revision handling
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")
2017-02-19repobrowse: unconditionally remove trailing slash handling
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.
2017-02-17repobrowse: minor style cleanups
Avoid using '=>' arrow notation for arrays and array references, it is confusing and more verbose. Additionally, combine "use constant" statements when possible.
2017-02-17repobrowse: remove unnecessary import
We do not need to escape URIs in this file.
2017-02-17repobrowse: rename "plain" endpoint to "raw"
This name is shorter and matches terminology in gitweb and other popular git web viewers.
2017-02-16repobrowse: memoize git symbolic-ref resolution
The "HEAD" symbolic ref is rarely changed, so memoize it for now and avoid exposing it in URLs.
2017-02-16repobrowse: shorten "repo_info" to "-repo"
This makes it more consistent with how we use the Inbox objects for the main code.
2017-02-16repobrowse: switch to new URL format to avoid query strings
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.
2017-02-14repobrowse: do not unescape PATH_INFO twice
PSGI specs already require PATH_INFO to be unescaped. Followup-to: commit 364de65f8a6b5729027cb70228312a141430122f ("www: do not unescape PATH_INFO twice")
2017-02-09repobrowse: shorten internal names
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.
2017-01-13repobrowse: comment describing Git wrapper creation
Metaprogramming can be difficult-to-read after several months, so leave comments in place to describe common usage results of.
2016-12-22repobrowse: remove Plack::Request dependency
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.
2016-12-14Merge remote-tracking branch 'origin/repobrowse' into repobrowse
* 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 ...
2016-04-05repobrowse: snapshot support for cgit compatibility
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).
2016-04-05repobrowse: implement diff view for compatibility
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.
2016-04-05repobrowse: improve API consistency, harder
This allows RepobrowseConfig objects to passed directly to Repobrowse initialization, similar to the way the normal Config can be passed to WWW at initialization.
2016-04-05repobrowse: standardize interface a bit
Make it closer to what the existing WWW interface is since we no longer rely on CGI.pm
2016-04-05repobrowse: git fallback allows smart cloning
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.
2016-04-05repobrowse: implement Atom feed
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.
2016-04-05repobrowse: drop CGI support
We already dropped CGI from the master branch, drop it from repobrowse as well to simplify code.
2016-04-05repobrowse: fix redirects with query string
We need to preserve the query string to avoid breakage.
2016-04-05repobrowse: show repository index
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.
2016-04-05repobrowse: redirect w/o trailing slashes for humans
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.
2016-04-05repobrowse: implement preliminary summary page
This should provide a decent landing page for projects. Alternative README files may be configured with the per-repo "readme" directive.
2016-04-05repobrowse: change Perl capitalization to "Repobrowse"
We mainly call it "repobrowse" (all lowercase), so do not imply it is two separate words by capitalizing "Browse".