summaryrefslogtreecommitdiff
path: root/guix/tests/git.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/tests/git.scm')
-rw-r--r--guix/tests/git.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/tests/git.scm b/guix/tests/git.scm
index 52abe77c83..9d5b1ae321 100644
--- a/guix/tests/git.scm
+++ b/guix/tests/git.scm
@@ -18,6 +18,7 @@
(define-module (guix tests git)
#:use-module (git)
+ #:use-module ((guix git) #:select (with-repository))
#:use-module (guix utils)
#:use-module (guix build utils)
#:use-module (ice-9 match)
@@ -55,7 +56,11 @@ Return DIRECTORY on success."
(mkdir-p (dirname file))
(call-with-output-file file
(lambda (port)
- (display contents port)))
+ (display (if (string? contents)
+ contents
+ (with-repository directory repository
+ (contents repository)))
+ port)))
(git "add" file)
(loop rest)))
((('commit text) rest ...)