user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 4/2] www_stream: fix stupid typo :x
  2016-07-01  2:15  7% ` [PATCH 3/2] git: allow cloning from the URL root, too Eric Wong
@ 2016-07-01  2:20  5%   ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-07-01  2:20 UTC (permalink / raw)
  To: meta

Note to self: remember to run tests

Fixes: 52052329aced ("git: allow cloning from the URL root, too")
---
 lib/PublicInbox/WwwStream.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index 87a461e..fdab4da 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -87,7 +87,7 @@ sub _html_end {
 		'- ' . $desc,
 		$urls,
 		'Archived served using code from public-inbox:',
-		"\tgit clone <a\nhref="$url">$url</a> public-inbox",
+		qq(\tgit clone <a\nhref="$url">$url</a> public-inbox),
 	).'</pre></body></html>';
 }
 
-- 
EW

^ permalink raw reply related	[relevance 5%]

* [PATCH 3/2] git: allow cloning from the URL root, too
  @ 2016-07-01  2:15  7% ` Eric Wong
  2016-07-01  2:20  5%   ` [PATCH 4/2] www_stream: fix stupid typo :x Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2016-07-01  2:15 UTC (permalink / raw)
  To: meta

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
---
 Documentation/dc-dlvr-spam-flow.txt | 2 +-
 README                              | 2 +-
 examples/public-inbox.psgi          | 4 +++-
 lib/PublicInbox/GitHTTPBackend.pm   | 2 +-
 lib/PublicInbox/WwwStream.pm        | 4 ++--
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Documentation/dc-dlvr-spam-flow.txt b/Documentation/dc-dlvr-spam-flow.txt
index d151d27..81aba76 100644
--- a/Documentation/dc-dlvr-spam-flow.txt
+++ b/Documentation/dc-dlvr-spam-flow.txt
@@ -45,4 +45,4 @@ delivery path as well as removing the message from the git tree.
 * spamc / spamd - SpamAssassin: http://spamassassin.apache.org/
 
 * report-spam / dc-dlvr - distributed with public-inbox in the scripts/
-  directory: git clone https://public-inbox.org/public-inbox.git
+  directory: git clone https://public-inbox.org/ public-inbox
diff --git a/README b/README
index ca4e2a8..f56d68d 100644
--- a/README
+++ b/README
@@ -87,7 +87,7 @@ Hacking
 
 Source code is available via git:
 
-	git clone https://public-inbox.org/public-inbox.git
+	git clone https://public-inbox.org/ public-inbox
 
 See below for contact info.
 
diff --git a/examples/public-inbox.psgi b/examples/public-inbox.psgi
index a90a2bc..11e2a6e 100644
--- a/examples/public-inbox.psgi
+++ b/examples/public-inbox.psgi
@@ -47,7 +47,9 @@ builder {
 	sub {
 		my ($env) = @_;
 		# share public-inbox.git code!
-		if ($src && $env->{PATH_INFO} =~ m!\A/public-inbox\.git/(.*)!) {
+		if ($src && $env->{PATH_INFO} =~
+				m!\A/(?:public-inbox(?:\.git)?/)?
+				($PublicInbox::GitHTTPBackend::ANY)\z!xo) {
 			PublicInbox::GitHTTPBackend::serve($env, $src, $1);
 		} else {
 			$www->call($env);
diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm
index 4f58c6b..b485192 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 97a6dc7..87a461e 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>';
 }
 

^ permalink raw reply related	[relevance 7%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-07-01  1:17     [PATCH 0/2] HTTPS smart git repository for our code Eric Wong
2016-07-01  2:15  7% ` [PATCH 3/2] git: allow cloning from the URL root, too Eric Wong
2016-07-01  2:20  5%   ` [PATCH 4/2] www_stream: fix stupid typo :x Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).