From b1488c76536c991c363aff7fd08dc6a49b8fbb30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Sat, 11 Nov 2017 18:38:27 +0100
Subject: [PATCH] git: Check whether 'clone-init-options' is defined.

This is a followup to 195f0d05c3f64e17e84b2683a7045a14ec578d61.

* guix/git.scm (clone*): Check whether 'clone-init-options' is defined
before using it.
---
 guix/git.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/guix/git.scm b/guix/git.scm
index ad4fc30c4b1..7a83b56216a 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -58,7 +58,10 @@ (define (clone* url directory)
 
       ;; Note: Explicitly pass options to work around the invalid default
       ;; value in Guile-Git: <https://bugs.gnu.org/29238>.
-      (clone url directory (clone-init-options)))
+      (if (module-defined? (resolve-interface '(git))
+                           'clone-init-options)
+          (clone url directory (clone-init-options))
+          (clone url directory)))
     (lambda _
       (false-if-exception (rmdir directory)))))
 
-- 
GitLab