user/dev discussion of public-inbox itself
 help / Atom feed
* [PATCH] wwwstream: always show multi-line cloning instructions
@ 2018-12-28 21:30 Eric Wong
  0 siblings, 0 replies; 1+ messages in thread
From: Eric Wong @ 2018-12-28 21:30 UTC (permalink / raw)
  To: meta

Unfortunately, long inbox names and URLs don't really display well
with my gigantic fonts...
---
 lib/PublicInbox/WwwStream.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index ec75f16..d39f551 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -99,11 +99,11 @@ sub _html_end {
 		push @urls, $u =~ /\Ahttps?:/ ? qq(<a\nhref="$u">$u</a>) : $u;
 	}
 
-	if (scalar(@urls) == 1) {
-		$urls .= " git clone --mirror $urls[0]";
-	} else {
+	if (defined($part) || scalar(@urls) > 1) {
 		$urls .= "\n" .
 			join("\n", map { "\tgit clone --mirror $_" } @urls);
+	} else {
+		$urls .= " git clone --mirror $urls[0]";
 	}
 	if (defined $part) {
 		my $addrs = $obj->{address};
-- 
EW


^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-28 21:30 [PATCH] wwwstream: always show multi-line cloning instructions Eric Wong

user/dev discussion of public-inbox itself

Archives are clonable:
	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.org/gmane.mail.public-inbox.general

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox