From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#51316: 29.0.50; Should we match the final ".git" in bug-reference autosetup? Date: Thu, 21 Oct 2021 14:18:32 +0200 Message-ID: <87ilxqbmg7.fsf@miha-pc> Reply-To: miha@kamnitnik.top Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40260"; mail-complaints-to="usenet@ciao.gmane.io" To: 51316@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 21 14:16:11 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 1mdWzS-000AHV-P1 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 14:16:11 +0200 Original-Received: from localhost ([::1]:39310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdWzQ-0006z6-P5 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Oct 2021 08:16:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdWyN-0006xT-2D for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 08:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdWyM-0004yE-OM for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 08:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mdWyM-0004U4-Kg for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 08:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: miha@kamnitnik.top Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Oct 2021 12:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51316 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163481849117199 (code B ref -1); Thu, 21 Oct 2021 12:15:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Oct 2021 12:14:51 +0000 Original-Received: from localhost ([127.0.0.1]:56365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdWyB-0004TI-23 for submit@debbugs.gnu.org; Thu, 21 Oct 2021 08:14:51 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:42512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdWy9-0004TB-Ny for submit@debbugs.gnu.org; Thu, 21 Oct 2021 08:14:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdWy9-0006qC-3p for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 08:14:49 -0400 Original-Received: from kamnitnik.top ([2001:19f0:5001:bf2:5400:2ff:fee0:2626]:38656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdWy4-0004jX-RZ for bug-gnu-emacs@gnu.org; Thu, 21 Oct 2021 08:14:47 -0400 Original-Received: from localhost (BSN-77-156-43.static.siol.net [193.77.156.43]) by kamnitnik.top (Postfix) with ESMTPSA id 3F7579C707 for ; Thu, 21 Oct 2021 12:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1634818480; bh=uPBtMS8mVcPNUrVo/N7ZEx3ltU59hkf9pArWxiwpSpM=; h=From:To:Subject:Date:From; b=w0coRiUNOPoQqEB679VBML1PYDUKED/mjS5wvC4Hiecy1h+BFWS2z1VSOA4ce31Dv gcNgUi1TApuxfS+jG0y96XDf7Q8bYGMejzNeKXQINekEOcVFqcrEAko73dGZiQ7LcJ pcZba98I16ig83AtpoDcuV5Vs7W+wTsbvovtEKShgvDk6OyKR2sieuGiNfKw/F1LH/ eoYAjUqKfJjxXEETfRyk7Vs0XWp8iw9nk9lHHWDhkEHmy3VZylzrdX1WNuaKkd5AM2 UNNTJJE3VZAxsyFb7dCdmGXFaycYEgs+E0Tw17JU4m0LPjPKEhmLKZfmtNOO9MeDH5 YifGcwaJSB1ug== Received-SPF: pass client-ip=2001:19f0:5001:bf2:5400:2ff:fee0:2626; envelope-from=miha@kamnitnik.top; helo=kamnitnik.top X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.498, FROM_SUSPICIOUS_NTLD_FP=1.997, PDS_OTHER_BAD_TLD=0.438, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:217763 Archived-At: --=-=-= Content-Type: text/plain If function 'bug-reference--build-forge-setup-entry': > `(,(concat "[/@]" host-domain "[/:]\\([.A-Za-z0-9_/-]+\\)\\.git") This should be "(regexp-quote host-domain)". Also, it would be nice if the final "\\.git" wasn't mandatory. I often git clone a website url as displayed in a web browser ("https://gitlab.com/rstocker/emacs-bluetooth" for example) without appending ".git". Git has no problem fetching from such an url (tested with github, gitlab and gitea), but bug-reference autosetup machinery fails to detect it as a valid url. Unfortunately, we can't simply change the final .git into "\\(?:\\.git\\)?" because regexp greediness would then swallow it into the first match group. Instead, something like this could work (concat "[/@]" (regexp-quote host-domain) "\\(?:" "\\(?1:[.A-Za-z0-9_/-]+\\)\\.git\\|" "\\(?1:[.A-Za-z0-9_/-]+\\)" "\\)") Thanks and best regards. In GNU Emacs 29.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmFxWpgTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP0JuEACbp70Revn2tv8J+BjDtBXwP95aYhYK Wy0Mt9bxD3sbP+TCZXBfdLk89zqVVE4fjfxkpMb3J16yIxDpvK6iPrhiUI0hLUkh K+cLGCmMKAe7YLakxN3yQIqsn9EV7BI9t9lLADa8ltpQUs27yP6aoQz8IrBCsByD yyggtdMU05rzJJaSlOFYLdGVH7SRTKng2oHALipGXOCScK5Qfb2EurphpR5lzh+G /v8mRvBNusm3IZKd+MET9iCu6AjWtz+AzZkP9WvSNvzToXT1y1gFzzXLfgygj5Jp JxrZCqOcCQyFRPDFGkJuxORKsk2ejtjwRHJO3kGuseaerf5VVGJ2yo2+H9Q6fc05 eRNSuoI3B7v6DFxDEDq0viOgbVLYrsv5UnNsF7YKPAjTNV9MdADuoqHNd/liiQmC POVM/buBqNnEPF7tIa6z7KQJkaaaYGeWgvdIX6zhbYrOd35Y2MM6gPjB0WlUD4nY frRKXMPJlGkkIZIHD5Pw9J18IGg1TsZwkfOoNLW7Q1d04rT/aHXo2U/YjZAcwPMb 5h3lFbXmor0SrWG1xQ7vfMyyRoJUVft7Lvdt68RpQqqiiGoK4TMCtYx/pvN8WizQ qJ/XiAXWHn58FUsFe8RgHeP9fIjSgjcoMLJVUHIGznBQztQPSA7a0LfRAbjXPbMB b8+7Rxq/I0/NdQ== =l+ue -----END PGP SIGNATURE----- --=-=-=--