Subject: Re: bug#79276: [PATCH] Pass remote name explicitly in bug-reference-try-setup-from-vc

From: André A. Gomes <[email-masked]>
Date: Mon, 25 Aug 2025 15:25:13 +0300

Tassilo Horn <[email-masked]> writes:

>> That sounds reasonable to me.  Perhaps a comment above that line
>> explaining the meaning of nil would be sensible.
>
> Yes, a comment would be utmost welcome.

Tassilo, I'm attaching a new version of the patch.  It should be ready
to be pushed.  Thank you.

-- 
André A. Gomes
"You cannot even find the ruins..."
>From 8572d6b70f22ebefc6309df3da8034cc717f3572 Mon Sep 17 00:00:00 2001
From: "Andre A. Gomes" <[email-masked]>
Date: Mon, 25 Aug 2025 15:14:14 +0300
Subject: [PATCH] Pass remote name explicitly in
 bug-reference-try-setup-from-vc.

* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Add comment explaining the meaning of the nil argument when calling
vc-call-backend.  Even though "origin" and nil are equivalent when using
the git backend, it is more intelligible to see "upstream" and "origin"
passed explicitly.
---
 lisp/progmodes/bug-reference.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 5c03c949049..13089b47514 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -393,7 +393,9 @@ bug-reference-try-setup-from-vc
                                (ignore-errors
                                  (vc-call-backend backend 'repository-url
                                                   file-or-dir remote)))
-                             '("upstream" nil))))
+                             ;; The nil value refers to the default
+                             ;; remote name for each vc remote.
+                             '("upstream" "origin" nil))))
     (seq-some (lambda (config)
                 (apply #'bug-reference-maybe-setup-from-vc url config))
               (append bug-reference-setup-from-vc-alist
-- 
2.48.1