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,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF 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 08D7F203D1 for ; Mon, 28 Nov 2022 05:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1669613572; bh=4PHUI8je5Neoapy7YJEbLmtfa12MCocP/GGv/Jvb5EY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=m8w2aifSYd4CXqjQKNh/4nsljwqKZ3o+zJkjc+CfTfMBX/WnLk4WAbFRQpX/fbq5J WGAh8nlsbG/Cc/ONiH9NGh+k1qYvoLZfKW+rSikJXZXX14IwwzvTtJAxq2QGTxN1QU EhqJCxW933IEIOoefCypnOEJmeAuIiJCbdhNDGgs= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 90/95] lei_mirror: omit trailing slash for git remote.*.url Date: Mon, 28 Nov 2022 05:32:27 +0000 Message-Id: <20221128053232.291618-91-e@80x24.org> In-Reply-To: <20221128053232.291618-1-e@80x24.org> References: <20221128053232.291618-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: While PublicInbox::WWW URLs have a trailing slash in them for compatibility with static web server mirrors, URLs intended for `git clone' don't benefit from this and the trailing `/' just looks awkward. --- lib/PublicInbox/LeiMirror.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm index cf4e58f1..5b7cf9e6 100644 --- a/lib/PublicInbox/LeiMirror.pm +++ b/lib/PublicInbox/LeiMirror.pm @@ -533,6 +533,8 @@ sub clone_v1 { my $lei = $self->{lei}; my $curl = $self->{curl} //= PublicInbox::LeiCurl->new($lei) or return; my $uri = URI->new($self->{cur_src} // $self->{src}); + my $path = $uri->path; + $path =~ s!/*\z!! and $uri->path($path); defined($lei->{opt}->{epoch}) and die "$uri is a v1 inbox, --epoch is not supported\n"; $self->{-torsocks} //= $curl->torsocks($lei, $uri) or return;