1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

git: Really enable timeouts when supported by Guile-Git.

This is a followup to 8bd013011d.

Previously, the call to ‘defined?’ would look for those bindings
in (current-module), where chances were that they would be missing;
consequently timeouts were never enabled.  This fixes that.

* guix/git.scm (set-git-timeouts)[defined?]: New procedure.

Change-Id: Ia14a351fd6d508f760992d7bb68d2f4bb61f8468
This commit is contained in:
Ludovic Courtès
2025-02-24 16:17:16 +01:00
parent 59167a010b
commit 48e0e6a127

View File

@@ -219,6 +219,9 @@ when talking to remote Git servers.
If one of them is #f, the corresponding default setting is kept unchanged."
;; 'set-server-timeout!' & co. were added in Guile-Git 0.9.0.
(define (defined? variable)
(module-defined? (resolve-interface '(git)) variable))
(when (and (defined? 'set-server-connection-timeout!)
connection-timeout)
(set-server-connection-timeout! connection-timeout))