git: Choose a saner default for '%repository-cache-directory'.

* guix/git.scm (%repository-cache-directory): Use 'cache-directory'
by default unless running as root.
This commit is contained in:
Ludovic Courtès 2018-09-17 22:02:31 +02:00
parent 3809824199
commit e83b2b0fdd
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -36,7 +36,8 @@ (define-module (guix git)
latest-repository-commit))
(define %repository-cache-directory
(make-parameter "/var/cache/guix/checkouts"))
(make-parameter (string-append (cache-directory #:ensure? #f)
"/checkouts")))
(define-syntax-rule (with-libgit2 thunk ...)
(begin