summaryrefslogtreecommitdiff
path: root/tissue/git.scm
diff options
context:
space:
mode:
authorArun Isaac2022-07-09 15:38:07 +0530
committerArun Isaac2022-07-09 16:41:02 +0530
commitfcbd627e9a4fe936485bcb080669d72b5b60324d (patch)
tree097aa4aba7bf16a8bf8fb930733c9cc0e6b49b1e /tissue/git.scm
parentb0cf99385a73b7461789aae2d71f7ad23ab5c56f (diff)
downloadtissue-fcbd627e9a4fe936485bcb080669d72b5b60324d.tar.gz
tissue-fcbd627e9a4fe936485bcb080669d72b5b60324d.tar.lz
tissue-fcbd627e9a4fe936485bcb080669d72b5b60324d.zip
git: Use commit author date, not committer date.
* tissue/git.scm (commit-author-date): New public function. (commit-date): Delete function. * tissue/issue.scm (read-gemtext-issue): Use commit-author-date instead of commit-date.
Diffstat (limited to 'tissue/git.scm')
-rw-r--r--tissue/git.scm16
1 files changed, 9 insertions, 7 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