From 48e0e6a1274e9112f13deb349cc533d5b7324e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 24 Feb 2025 16:17:16 +0100 Subject: [PATCH] git: Really enable timeouts when supported by Guile-Git. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- guix/git.scm | 3 +++ 1 file changed, 3 insertions(+) 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))