summaryrefslogtreecommitdiff
path: root/guix/git.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/git.scm')
-rw-r--r--guix/git.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/git.scm b/guix/git.scm
index 57fa2ca1ee..9c6f326c36 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -424,6 +424,14 @@ it unchanged."
;; REPOSITORY as soon as possible.
(repository-close! repository)
+ ;; Update CACHE-DIRECTORY's mtime to so the cache logic sees it.
+ (match (gettimeofday)
+ ((seconds . microseconds)
+ (let ((nanoseconds (* 1000 microseconds)))
+ (utime cache-directory
+ seconds seconds
+ nanoseconds nanoseconds))))
+
;; When CACHE-DIRECTORY is a sub-directory of the default cache
;; directory, remove expired checkouts that are next to it.
(let ((parent (dirname cache-directory)))