From 9621f0ab61c4f2de1e613095db0f130a912b0f93 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 16 Oct 2023 14:07:02 +0100 Subject: Make ensure-repository-exist! work in fibers Assuming the repository exists, which it generally will. --- guix-qa-frontpage/git-repository.scm | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'guix-qa-frontpage/git-repository.scm') diff --git a/guix-qa-frontpage/git-repository.scm b/guix-qa-frontpage/git-repository.scm index a0b4eca..ec6996f 100644 --- a/guix-qa-frontpage/git-repository.scm +++ b/guix-qa-frontpage/git-repository.scm @@ -37,23 +37,23 @@ (thunk)))) (define (ensure-repository-exists!) - (when (current-scheduler) - (error "guix.git-excursion can't be used from fibers")) - - (monitor - (unless (file-exists? (%git-repository-location)) - (invoke "git" "init" "--bare" - (%git-repository-location)) - - (guix.git-excursion - (lambda () - (invoke "git" "remote" "add" "origin" - "https://git.savannah.gnu.org/git/guix.git") - (invoke "git" "remote" "add" "patches" - "git@git.guix-patches.cbaines.net:guix-patches") - - (invoke "git" "config" "user.name" "Guix Patches Tester") - (invoke "git" "config" "user.email" "")))))) + (unless (file-exists? (%git-repository-location)) + (when (current-scheduler) + (error "guix.git-excursion can't be used from fibers")) + (monitor + (unless (file-exists? (%git-repository-location)) + (invoke "git" "init" "--bare" + (%git-repository-location)) + + (guix.git-excursion + (lambda () + (invoke "git" "remote" "add" "origin" + "https://git.savannah.gnu.org/git/guix.git") + (invoke "git" "remote" "add" "patches" + "git@git.guix-patches.cbaines.net:guix-patches") + + (invoke "git" "config" "user.name" "Guix Patches Tester") + (invoke "git" "config" "user.email" ""))))))) (define (update-repository!) (with-bare-git-repository -- cgit v1.2.3