Subject: [bug#62156] [PATCH v3 2/2] lint: Append "/info/refs" to git-reference-url.

From: Felix Lechner <[email-masked]>
Date: Mon, 20 Mar 2023 09:57:19 -0700

For the atftp package added in the preceeding commit, lint produced this
warning:

  gnu/packages/networking.scm:2924:5: [email-masked]:
    URI https://git.code.sf.net/p/atftp/code not reachable:
      404 ("Not Found")

Thanks to Sergey Trofimov for suggesting a fix! [1]

  [1]  https://issues.guix.gnu.org/62156#3

It was implemented here, and the warning disappeared.

* guix/lint.scm (check-source): Append "/info/refs" to git-reference-url.

Co-authored-by: Sergey Trofimov <[email-masked]>
---
 guix/lint.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/lint.scm b/guix/lint.scm
index a1a27873d9..394d68c472 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -1224,7 +1224,9 @@ (define (warnings-for-uris uris)
                 '())))
          ((git-reference? (origin-uri origin))
           (warnings-for-uris
-           (list (string->uri (git-reference-url (origin-uri origin))))))
+           (list (string->uri (string-append
+                               (git-reference-url (origin-uri origin))
+                               "/info/refs")))))
          ((or (svn-reference? (origin-uri origin))
               (svn-multi-reference? (origin-uri origin)))
           (let ((uri (svn-reference-uri-with-userinfo (origin-uri origin))))
-- 
2.39.1