guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/04: git: Add a 'recursive?' field to <git-checkout> records.


From: guix-commits
Subject: 02/04: git: Add a 'recursive?' field to <git-checkout> records.
Date: Fri, 8 Feb 2019 04:41:22 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 06fff484cec2abc1702e2131d963ed086c5e0b29
Author: Ludovic Courtès <address@hidden>
Date:   Fri Feb 8 09:16:27 2019 +0100

    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.
---
 guix/git.scm | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/guix/git.scm b/guix/git.scm
index e2daa78..51b8aa9 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -273,9 +273,10 @@ Log progress and checkout info to LOG-PORT."
   git-checkout?
   (url     git-checkout-url)
   (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'.
   (lambda (store)
     ;; 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
       (lambda ()
         (values (latest-repository-commit store url
-                                          #:ref ref #:log-port log-port)
+                                          #:ref ref
+                                          #:recursive? recursive?
+                                          #:log-port log-port)
                 store))
       (lambda (key error . _)
         (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
   ;; store.
   (match checkout
-    (($ <git-checkout> url branch commit)
+    (($ <git-checkout> url branch commit recursive?)
      (latest-repository-commit* url
                                 #:ref (if commit
                                           `(commit . ,commit)
                                           `(branch . ,branch))
+                                #:recursive? recursive?
                                 #:log-port (current-error-port)))))
 
 ;; Local Variables:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]