summaryrefslogtreecommitdiff
path: root/guix/git.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-12-05 23:41:30 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-12-05 23:41:30 +0100
commit77181815ae70cf573b6fa390a4400b718835aa8a (patch)
tree731ccaaccc7a69ddc90f04bb71a6a39aa5f3be5a /guix/git.scm
parente3f9406b7c4b3b1afe3dd6affb7f7898434d607a (diff)
parent35377cfa908340e51fd22af7369aef15499d4a36 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/git.scm')
-rw-r--r--guix/git.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/guix/git.scm b/guix/git.scm
index 7a83b56216..fc41e2ace3 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -80,11 +80,17 @@ of SHA1 string."
"-" (string-take sha1 7)))
(define* (copy-to-store store cache-directory #:key url repository)
- "Copy items in cache-directory to store. URL and REPOSITORY are used
-to forge store directory name."
+ "Copy CACHE-DIRECTORY recursively to STORE. URL and REPOSITORY are used to
+create the store directory name."
+ (define (dot-git? file stat)
+ (and (string=? (basename file) ".git")
+ (eq? 'directory (stat:type stat))))
+
(let* ((commit (repository->head-sha1 repository))
(name (url+commit->name url commit)))
- (values (add-to-store store name #t "sha256" cache-directory) commit)))
+ (values (add-to-store store name #t "sha256" cache-directory
+ #:select? (negate dot-git?))
+ commit)))
(define (switch-to-ref repository ref)
"Switch to REPOSITORY's branch, commit or tag specified by REF."