git: Add a 'recursive?' field to <git-checkout> records.
* guix/git.scm (<git-checkout>)[recursive?]: New field. (latest-repository-commit*): Add #:recursive? and honor it. (git-checkout-compiler): Honor the 'recursive?' field of CHECKOUT.
This commit is contained in:
parent
60cbc6a8df
commit
06fff484ce
12
guix/git.scm
12
guix/git.scm
|
@ -273,9 +273,10 @@ Log progress and checkout info to LOG-PORT."
|
||||||
git-checkout?
|
git-checkout?
|
||||||
(url git-checkout-url)
|
(url git-checkout-url)
|
||||||
(branch git-checkout-branch (default "master"))
|
(branch git-checkout-branch (default "master"))
|
||||||
(commit git-checkout-commit (default #f)))
|
(commit git-checkout-commit (default #f))
|
||||||
|
(recursive? git-checkout-recursive? (default #f)))
|
||||||
|
|
||||||
(define* (latest-repository-commit* url #:key ref log-port)
|
(define* (latest-repository-commit* url #:key ref recursive? log-port)
|
||||||
;; Monadic variant of 'latest-repository-commit'.
|
;; Monadic variant of 'latest-repository-commit'.
|
||||||
(lambda (store)
|
(lambda (store)
|
||||||
;; The caller--e.g., (guix scripts build)--may not handle 'git-error' so
|
;; The caller--e.g., (guix scripts build)--may not handle 'git-error' so
|
||||||
|
@ -284,7 +285,9 @@ Log progress and checkout info to LOG-PORT."
|
||||||
(catch 'git-error
|
(catch 'git-error
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(values (latest-repository-commit store url
|
(values (latest-repository-commit store url
|
||||||
#:ref ref #:log-port log-port)
|
#:ref ref
|
||||||
|
#:recursive? recursive?
|
||||||
|
#:log-port log-port)
|
||||||
store))
|
store))
|
||||||
(lambda (key error . _)
|
(lambda (key error . _)
|
||||||
(raise (condition
|
(raise (condition
|
||||||
|
@ -306,11 +309,12 @@ Log progress and checkout info to LOG-PORT."
|
||||||
;; "Compile" CHECKOUT by updating the local checkout and adding it to the
|
;; "Compile" CHECKOUT by updating the local checkout and adding it to the
|
||||||
;; store.
|
;; store.
|
||||||
(match checkout
|
(match checkout
|
||||||
(($ <git-checkout> url branch commit)
|
(($ <git-checkout> url branch commit recursive?)
|
||||||
(latest-repository-commit* url
|
(latest-repository-commit* url
|
||||||
#:ref (if commit
|
#:ref (if commit
|
||||||
`(commit . ,commit)
|
`(commit . ,commit)
|
||||||
`(branch . ,branch))
|
`(branch . ,branch))
|
||||||
|
#:recursive? recursive?
|
||||||
#:log-port (current-error-port)))))
|
#:log-port (current-error-port)))))
|
||||||
|
|
||||||
;; Local Variables:
|
;; Local Variables:
|
||||||
|
|
Loading…
Reference in New Issue