From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#51316: 29.0.50; Should we match the final ".git" in bug-reference autosetup? Date: Sat, 23 Oct 2021 11:12:38 +0200 Message-ID: <8735osayjm.fsf@gnu.org> References: <87ilxqbmg7.fsf@miha-pc> <87sfwtcdg5.fsf@gnus.org> <87wnm49345.fsf@gnu.org> <87v91o7n3f.fsf@miha-pc> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23359"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.3; emacs 29.0.50 Cc: Lars Ingebrigtsen , 51316@debbugs.gnu.org To: miha@kamnitnik.top Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 23 14:17:25 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1meFxj-0005nF-MW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 14:17:25 +0200 Original-Received: from localhost ([::1]:55464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meFxi-0003ab-8f for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Oct 2021 08:17:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meFxP-0003Z9-Ia for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 08:17:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51269) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1meFxP-0004Sw-AM for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 08:17:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1meFxP-00084m-5h for bug-gnu-emacs@gnu.org; Sat, 23 Oct 2021 08:17:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Oct 2021 12:17:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51316 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 51316-submit@debbugs.gnu.org id=B51316.163499137730956 (code B ref 51316); Sat, 23 Oct 2021 12:17:03 +0000 Original-Received: (at 51316) by debbugs.gnu.org; 23 Oct 2021 12:16:17 +0000 Original-Received: from localhost ([127.0.0.1]:34576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meFwe-00083D-Gn for submit@debbugs.gnu.org; Sat, 23 Oct 2021 08:16:17 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:36911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meEZT-0001X6-Uf for 51316@debbugs.gnu.org; Sat, 23 Oct 2021 06:48:19 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 937A35C0455; Sat, 23 Oct 2021 06:48:10 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sat, 23 Oct 2021 06:48:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= references:from:to:cc:subject:date:message-id:in-reply-to :mime-version:content-type; s=fm1; bh=4bnXgvGVrjUsHOKOJUd8dy+8y2 huu2bdw26gl6alXuA=; b=X1aSmfsTkh7x3tpO+nF10tLjxG635x7fbc/lRvI895 nhcmIwq1ea8eWbRzAtUCDzNIqWcTCUiM0PvrdJrtP0rp22xEFm8kce/u5sZV0UV+ NkfIRTQxVzPLbOn0z/SNEnnNzWBZ2YeuAq2mmsOTu/yU7E46EFn42XqMEWQ94geF 1rEqmS8Bx+0ta50e17G7Ok0bLM9v8nwip53Ffl07Yrr4b7/J+cawHnVeKOV7BWA7 pY2sdCmWv5GNHWIvG44fkL1g1v5TYRDW69WydDn8+XNCFOLbi/Qcjvw3FgTzI8l4 +kLb5UBI90ANMlfM32vSgmwP+5xsH3nk0DzpBFaG8chw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=4bnXgv GVrjUsHOKOJUd8dy+8y2huu2bdw26gl6alXuA=; b=HEFY23O12h0SLOKvGtELUC w6i2kLkrdaze7wgdYd57iVmEa+x1ZGv/m9L45jeyzZOY+vREUSE8F9atPVZLkgbX eGuUpoDSCHzfQHCzb11R5EUiJsvNuSQ88FZBAm/b0hXejze630zCAHsYA4koZSaA VOpk/MeqfXRelwJN+wLH28FLGYIDs3UDKAvUrWCWl17Qledxe9z/gcDnMPwJIq5p bDvn57oFP3NKQIq5rvrS7zHVPb10peZPl2eqzo2giYl40hwRRNS4uXWyhpt5Eaya rP9nRvNyEn3HEDif4ta/v3o0h3Ib0zZ/0fel12Ugve/JI88OLok7IxQMUvalT00w == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdeftddgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufffkfgjgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehthhhorhhnodhgnhhusehfrghsthhmrghilhdrfhhmqeenucggtf frrghtthgvrhhnpeeujeeuleffieejtdevfeekkedvgefgteefvdehvdegudevtdelledt hefgtefhjeenucffohhmrghinhepfhhorhhgvgdrohhrghdpghhithhlrggsrdgtohhmpd hgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehthhhorhhnodhgnhhusehfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 23 Oct 2021 06:48:09 -0400 (EDT) In-reply-to: <87v91o7n3f.fsf@miha-pc> X-Mailman-Approved-At: Sat, 23 Oct 2021 08:16:15 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217977 Archived-At: writes: >>> But requires that the string doesn't have anything after the .git, >>> whereas it's currently more sloppy. I'm not sure whether that's by >>> intent or not. (So I'm adding Tassilo to the CCs.) >> >> No, in my experience there cannot be anything after ".git". At least >> it's the last part of the filename and I doubt you can have query >> parameters like https://forge.org/user/project.git?foo=bar in a git >> url. >> > I tried "git clone https://gitlab.com/rstocker/emacs-bluetooth.git/" > and it worked, so we should probably allow ".git/" with a final slash > as well. Ah, good catch, that's obviously correct since .git it is a directory. > And then I also tried "git clone > https://gitlab.com/rstocker/emacs-bluetooth.git//" and it also worked, > so I guess any number of slashes are allowed after the final ".git". I've also tried, and it seems the maximum number of trailing slashes is two. Those all work: https://github.com/djcb/mu https://github.com/djcb/mu/ https://github.com/djcb/mu// https://github.com/djcb/mu.git https://github.com/djcb/mu.git/ https://github.com/djcb/mu.git// but any more / gives me "Not found". Well, and I guess even the two-/ will most probably never occur in real-life when considering where the URL comes from. I mean, those are usually copy-and-pasted from the forge's special "clone me" button or from a browser's URL bar. > Therefore I propose something like this: > > "[/:]\\([.A-Za-z0-9_/-]+?\\)\\(?:\\.git/*\\)?\\'" With the reasoning above, I'd suggest using "[/:]\\([.A-Za-z0-9_/-]+?\\)\\(?:\\.git/?\\)?\\'" Bye, Tassilo