diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-03-26 00:12:52 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-03-26 00:15:52 +0200 |
commit | dfca24180c96342fac05d665ea8b03c02e61204c (patch) | |
tree | 10bf0dc62b45d3483d79d7f3d381783575c820bc | |
parent | ae0a5a7edcd5e7874dc294dede74a69fa6d1df32 (diff) | |
download | gnu-guix-dfca24180c96342fac05d665ea8b03c02e61204c.tar gnu-guix-dfca24180c96342fac05d665ea8b03c02e61204c.tar.gz |
git: 'latest-repository-commit' calls 'repository-close!'.
* guix/git.scm (latest-repository-commit): Call 'repository-close!'
when it exists.
-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)))) |