mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
git: 'latest-repository-commit' calls 'repository-close!'.
* guix/git.scm (latest-repository-commit): Call 'repository-close!' when it exists.
This commit is contained in:
parent
ae0a5a7edc
commit
dfca24180c
1 changed files with 7 additions and 0 deletions
|
@ -147,6 +147,13 @@ (define* (latest-repository-commit store url
|
|||
(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))))
|
||||
|
|
Loading…
Reference in a new issue