diff options
author | Eric Wong <e@80x24.org> | 2016-07-01 02:09:45 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-07-01 02:14:10 +0000 |
commit | 52052329acedddc0082487283a5a0390a8c86602 (patch) | |
tree | a8da1e82f2f54a69813c252d9fe90564133945e3 /lib | |
parent | 79bf257cbc4e188992f540d6b4ae1bd5cbcf26ee (diff) | |
download | public-inbox-52052329acedddc0082487283a5a0390a8c86602.tar.gz |
This means we can still show non-git users a somewhat browseable URL with a link to the README.html file while allowing git users to type less when cloning. All of the following are supported: git clone https://public-inbox.org/ public-inbox git clone https://public-inbox.org/public-inbox git clone https://public-inbox.org/public-inbox.git torsocks git clone http://ou63pmih66umazou.onion/public-inbox
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/GitHTTPBackend.pm | 2 | ||||
-rw-r--r-- | lib/PublicInbox/WwwStream.pm | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm index 4f58c6bb..b4851920 100644 --- a/lib/PublicInbox/GitHTTPBackend.pm +++ b/lib/PublicInbox/GitHTTPBackend.pm @@ -23,7 +23,7 @@ my @binary = qw! objects/pack/pack-[a-f0-9]{40}\.(?:pack|idx) !; -our $ANY = join('|', @binary, @text); +our $ANY = join('|', @binary, @text, 'git-upload-pack'); my $BIN = join('|', @binary); my $TEXT = join('|', @text); diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index 97a6dc78..87a461e1 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -7,7 +7,7 @@ use strict; use warnings; use PublicInbox::Hval qw(ascii_html); use URI; -use constant PI_URL => 'https://public-inbox.org/public-inbox.git'; +use constant PI_URL => 'https://public-inbox.org/'; sub new { my ($class, $ctx, $cb) = @_; @@ -87,7 +87,7 @@ sub _html_end { '- ' . $desc, $urls, 'Archived served using code from public-inbox:', - "\tgit clone $url", + "\tgit clone <a\nhref="$url">$url</a> public-inbox", ).'</pre></body></html>'; } |