diff options
-rw-r--r-- | guix/git.scm | 7 |
1 files changed, 7 insertions, 0 deletions
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)))) |