guix-commits
[Top][All Lists]
Advanced

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

01/02: git: 'latest-repository-commit' calls 'repository-close!'.


From: Ludovic Courtès
Subject: 01/02: git: 'latest-repository-commit' calls 'repository-close!'.
Date: Sun, 25 Mar 2018 18:15:58 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit dfca24180c96342fac05d665ea8b03c02e61204c
Author: Ludovic Courtès <address@hidden>
Date:   Mon Mar 26 00:12:52 2018 +0200

    git: 'latest-repository-commit' calls 'repository-close!'.
    
    * guix/git.scm (latest-repository-commit): Call 'repository-close!'
    when it exists.
---
 guix/git.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/guix/git.scm b/guix/git.scm
index d31c35f..103749d 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -147,6 +147,13 @@ Git repositories are kept in the cache directory specified 
by
      (when cache-exists?
        (remote-fetch (remote-lookup repository "origin")))
      (switch-to-ref repository ref)
+
+     ;; Reclaim file descriptors and memory mappings associated with
+     ;; REPOSITORY as soon as possible.
+     (when (module-defined? (resolve-interface '(git repository))
+                            'repository-close!)
+       (repository-close! repository))
+
      (copy-to-store store cache-dir
                     #:url url
                     #:repository repository))))



reply via email to

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