summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tissue/git.scm16
-rw-r--r--tissue/issue.scm6
2 files changed, 12 insertions, 10 deletions
diff --git a/tissue/git.scm b/tissue/git.scm
index 024ebb6..1f6c0ef 100644
--- a/tissue/git.scm
+++ b/tissue/git.scm
@@ -41,7 +41,7 @@
git-top-level
%current-git-repository
current-git-repository
- commit-date
+ commit-author-date
git-tracked-files
call-with-file-in-git
file-modification-table
@@ -99,12 +99,14 @@ directory."
(commit-lookup repository
(reference-name->oid repository "HEAD"))))
-(define (commit-date commit)
- (time-monotonic->date
- (make-time time-monotonic
- 0
- (commit-time commit))
- (* 60 (commit-time-offset commit))))
+(define (commit-author-date commit)
+ "Return the author date of COMMIT as an SRFI-19 date object."
+ (let ((time (signature-when (commit-author commit))))
+ (time-monotonic->date
+ (make-time time-monotonic
+ 0
+ (time-time time))
+ (* 60 (time-offset time)))))
(define* (git-tracked-files #:optional (repository (current-git-repository)))
"Return a list of all files and directories tracked in REPOSITORY. The
diff --git a/tissue/issue.scm b/tissue/issue.scm
index a77e57a..ac397b4 100644
--- a/tissue/issue.scm
+++ b/tissue/issue.scm
@@ -382,9 +382,9 @@ gemtext file."
#:title (let ((title (hashtable-ref file-details 'title "")))
(if (string-any char-set:letter title) title file))
#:creator (first commit-authors)
- #:created-date (commit-date (first commits))
+ #:created-date (commit-author-date (first commits))
#:last-updater (last commit-authors)
- #:last-updated-date (commit-date (last commits))
+ #:last-updated-date (commit-author-date (last commits))
#:assigned (hashtable-ref file-details 'assigned '())
;; "closed" is a special keyword to indicate the open/closed
;; status of an issue.
@@ -395,6 +395,6 @@ gemtext file."
#:posts (map (lambda (commit author)
(make <post>
#:author author
- #:date (commit-date commit)))
+ #:date (commit-author-date commit)))
commits
commit-authors))))