From dfca24180c96342fac05d665ea8b03c02e61204c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 26 Mar 2018 00:12:52 +0200 Subject: 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 d31c35f64f..103749d0e2 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)))) -- cgit v1.2.3