aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2025-02-24 16:17:16 +0100
committerLudovic Courtès <ludo@gnu.org>2025-02-24 23:33:51 +0100
commit48e0e6a1274e9112f13deb349cc533d5b7324e93 (patch)
tree53a0569efb645cdf9ca06efd335f92c45905d43b
parent59167a010bbfa61c0fa64b2aa37d5f2481dc7b27 (diff)
downloadguix-48e0e6a1274e9112f13deb349cc533d5b7324e93.tar.gz
guix-48e0e6a1274e9112f13deb349cc533d5b7324e93.zip
git: Really enable timeouts when supported by Guile-Git.
This is a followup to 8bd013011ddde259c0dd0334847ce31a63263962. 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
-rw-r--r--guix/git.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/guix/git.scm b/guix/git.scm
index 6ac6e4e3a2..4164531c0b 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -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))