guix-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Mathieu Othacehe
Date: Thu, 10 Sep 2020 09:16:58 -0400 (EDT)

branch: master
commit af12a80599346968fb9f52edb33b48dd26852788
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Mon Sep 7 15:43:39 2020 +0200

    Do not use commit time as checkout timestamp.
    
    Commit time can be far away from the actual push time. Thus, use the 
checkout
    time instead of the commit time to fill Checkouts 'timestamp' field.
    
    * src/cuirass/base.scm (fetch-input): Return the checkout time instead of 
the
    commit time.
---
 src/cuirass/base.scm | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm
index 9b81b3c..678c976 100644
--- a/src/cuirass/base.scm
+++ b/src/cuirass/base.scm
@@ -198,10 +198,6 @@ read-only directory."
         branch
         (string-append "origin/" branch)))
 
-  (define (commit-timestamp directory commit)
-    (with-repository directory repository
-      (commit-time (commit-lookup repository (string->oid commit)))))
-
   (let ((name   (assq-ref input #:name))
         (url    (assq-ref input #:url))
         (branch (and=> (assq-ref input #:branch)
@@ -219,9 +215,7 @@ read-only directory."
                                              (%package-cachedir)
                                              #:ref (or branch commit tag)))
                   ((timestamp)
-                   (commit-timestamp
-                    (url-cache-directory url (%package-cachedir))
-                    commit)))
+                   (time-second (current-time time-utc))))
       ;; TODO: When WRITABLE-COPY? is true, we could directly copy the
       ;; checkout directly in a writable location instead of copying it to the
       ;; store first.



reply via email to

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