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.
This commit is contained in:
Mathieu Othacehe 2020-09-07 15:43:39 +02:00
parent 33798abc3b
commit af12a80599
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 1 additions and 7 deletions

View File

@ -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.