From 0c57f0cfe8ab04dedad26d21e7e1589858b351dc Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 28 Dec 2018 20:38:59 +0000 Subject: wwwstream: always show multi-line cloning instructions 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(-) (limited to 'lib/PublicInbox/WwwStream.pm') diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index ec75f16c..d39f5511 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -99,11 +99,11 @@ sub _html_end { push @urls, $u =~ /\Ahttps?:/ ? qq($u) : $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}; -- cgit v1.2.3-24-ge0c7