guix-commits
[Top][All Lists]
Advanced

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

01/07: git: 'latest-repository-commit' logs its progress.


From: guix-commits
Subject: 01/07: git: 'latest-repository-commit' logs its progress.
Date: Fri, 30 Nov 2018 11:03:26 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 35cb37ea9c1183b9cdd064ed3a1478b4dd342754
Author: Ludovic Court├Ęs <address@hidden>
Date:   Tue Nov 27 14:48:32 2018 +0100

    git: 'latest-repository-commit' logs its progress.
    
    * guix/git.scm (latest-repository-commit): Add #:log-port and honor it.
---
 guix/git.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/guix/git.scm b/guix/git.scm
index d007916..7864502 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -154,6 +154,7 @@ data, respectively [<branch name> | <sha1> | <tag name>]."
 
 (define* (latest-repository-commit store url
                                    #:key
+                                   (log-port (%make-void-port "w"))
                                    (cache-directory
                                     (%repository-cache-directory))
                                    (ref '(branch . "master")))
@@ -164,11 +165,14 @@ REF is pair whose key is [branch | commit | tag] and 
value the associated
 data, respectively [<branch name> | <sha1> | <tag name>].
 
 Git repositories are kept in the cache directory specified by
-%repository-cache-directory parameter."
+%repository-cache-directory parameter.
+
+Log progress and checkout info to LOG-PORT."
   (define (dot-git? file stat)
     (and (string=? (basename file) ".git")
          (eq? 'directory (stat:type stat))))
 
+  (format log-port "updating checkout of '~a'...~%" url)
   (let*-values
       (((checkout commit)
         (update-cached-checkout url
@@ -177,6 +181,7 @@ Git repositories are kept in the cache directory specified 
by
                                 (url-cache-directory url cache-directory)))
        ((name)
         (url+commit->name url commit)))
+    (format log-port "retrieved commit ~a~%" commit)
     (values (add-to-store store name #t "sha256" checkout
                           #:select? (negate dot-git?))
             commit)))



reply via email to

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