From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 4378A1F804 for ; Fri, 28 Dec 2018 21:30:02 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] wwwstream: always show multi-line cloning instructions Date: Fri, 28 Dec 2018 21:30:02 +0000 Message-Id: <20181228213002.12160-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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($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}; -- EW