diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-09-07 15:43:39 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-09-07 15:53:19 +0200 |
commit | af12a80599346968fb9f52edb33b48dd26852788 (patch) | |
tree | e43399677bcd3c478a56161eb7eae4b765b2ab83 | |
parent | 33798abc3bb32af619ce350b479888d190021ae9 (diff) | |
download | cuirass-af12a80599346968fb9f52edb33b48dd26852788.tar cuirass-af12a80599346968fb9f52edb33b48dd26852788.tar.gz |
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.
-rw-r--r-- | src/cuirass/base.scm | 8 |
1 files changed, 1 insertions, 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. |