diff options
author | Christopher Baines <mail@cbaines.net> | 2023-10-16 14:07:02 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-10-16 14:07:02 +0100 |
commit | 9621f0ab61c4f2de1e613095db0f130a912b0f93 (patch) | |
tree | 207278883fa50eddc34c1ebfabc4223de411f743 /guix-qa-frontpage/git-repository.scm | |
parent | 750c92ab8ac4b3458e63bee150c124c391248a8f (diff) | |
download | qa-frontpage-9621f0ab61c4f2de1e613095db0f130a912b0f93.tar qa-frontpage-9621f0ab61c4f2de1e613095db0f130a912b0f93.tar.gz |
Make ensure-repository-exist! work in fibers
Assuming the repository exists, which it generally will.
Diffstat (limited to 'guix-qa-frontpage/git-repository.scm')
-rw-r--r-- | guix-qa-frontpage/git-repository.scm | 34 |
1 files changed, 17 insertions, 17 deletions
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 |