guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Close the repository when pulling


From: Christopher Baines
Subject: branch master updated: Close the repository when pulling
Date: Mon, 16 Oct 2023 16:19:19 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository data-service.

The following commit(s) were added to refs/heads/master by this push:
     new 89782b3  Close the repository when pulling
89782b3 is described below

commit 89782b34499befbef7b9c4e13e5ff5178c7e27b4
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Mon Oct 16 21:18:44 2023 +0100

    Close the repository when pulling
    
    And remove the monitor, as I'm not sure it's necessary.
---
 guix-data-service/poll-git-repository.scm | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/guix-data-service/poll-git-repository.scm 
b/guix-data-service/poll-git-repository.scm
index 1ce271a..e059343 100644
--- a/guix-data-service/poll-git-repository.scm
+++ b/guix-data-service/poll-git-repository.scm
@@ -77,7 +77,8 @@
     ;; Only fetch remote if it has not been cloned just before.
     (when cache-exists?
       (remote-fetch (remote-lookup repository "origin")
-                    #:fetch-options ((@@ (guix git) 
make-default-fetch-options))))))
+                    #:fetch-options ((@@ (guix git) 
make-default-fetch-options))))
+    (repository-close! repository)))
 
 (define (poll-git-repository conn git-repository-id)
   (define git-repository-details
@@ -89,18 +90,16 @@
    conn
    'latest-channel-instances
    (lambda ()
-     ;; Maybe this helps avoid segfaults?
-     (monitor
-      ;; This was using update-cached-checkout, but it wants to checkout
-      ;; refs/remotes/origin/HEAD by default, and that can fail for some
-      ;; reason on some repositories:
-      ;;
-      ;;   reference 'refs/remotes/origin/HEAD' not found
-      ;;
-      ;; I just want to update the cached checkout though, so trying to
-      ;; checkout some revision is unnecessary, hence
-      ;; just-update-cached-checkout
-      (just-update-cached-checkout (second git-repository-details)))
+     ;; This was using update-cached-checkout, but it wants to checkout
+     ;; refs/remotes/origin/HEAD by default, and that can fail for some reason
+     ;; on some repositories:
+     ;;
+     ;;   reference 'refs/remotes/origin/HEAD' not found
+     ;;
+     ;; I just want to update the cached checkout though, so trying to
+     ;; checkout some revision is unnecessary, hence
+     ;; just-update-cached-checkout
+     (just-update-cached-checkout (second git-repository-details))
 
      (let* ((repository-directory
              (url-cache-directory



reply via email to

[Prev in Thread] Current Thread [Next in Thread]