all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#51316: 29.0.50; Should we match the final ".git" in bug-reference autosetup?
@ 2021-10-21 12:18 miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-22 14:59 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-10-21 12:18 UTC (permalink / raw)
  To: 51316

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

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)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-10-27 13:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-21 12:18 bug#51316: 29.0.50; Should we match the final ".git" in bug-reference autosetup? miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-22 14:59 ` Lars Ingebrigtsen
2021-10-22 20:45   ` Tassilo Horn
2021-10-22 21:42     ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-23  9:12       ` Tassilo Horn
2021-10-23 12:58         ` Gregory Heytings
2021-10-24 12:17     ` Lars Ingebrigtsen
2021-10-26  9:01       ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-27 13:02         ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.