summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-03-18 16:58:44 +0530
committerArun Isaac2022-03-18 16:58:44 +0530
commit673fd702ec144eea671a68940d97e0d6543710ec (patch)
treea1cf94efebd305302c2df6cb2fc92184beda3fd8
parent4ca7a5ae2f80b41bf6ef8aecbcb5325bc788d968 (diff)
downloadtissue-673fd702ec144eea671a68940d97e0d6543710ec.tar.gz
tissue-673fd702ec144eea671a68940d97e0d6543710ec.tar.lz
tissue-673fd702ec144eea671a68940d97e0d6543710ec.zip
issue: Arrange posts oldest first.
* tissue/issue.scm (issues): Arrange posts oldest first. (<issue>)[posts]: Comment on order of contents.
-rw-r--r--tissue/issue.scm38
1 files changed, 20 insertions, 18 deletions
diff --git a/tissue/issue.scm b/tissue/issue.scm
index 91585a7..a86484d 100644
--- a/tissue/issue.scm
+++ b/tissue/issue.scm
@@ -72,6 +72,7 @@
(open issue-open?)
(tasks issue-tasks)
(completed-tasks issue-completed-tasks)
+ ;; List of <post> objects, oldest first.
(posts issue-posts))
(define-record-type <post>
@@ -234,24 +235,25 @@ in (tissue tissue). If no alias is found, NAME is returned as such."
(lambda (port)
(hashtable-set!
result 'posts
- (port-transduce
- (compose (tenumerate)
- (tmap (match-lambda
- ((index . line)
- (let* ((alist (call-with-input-string line read))
- (author (resolve-alias (assq-ref alist 'author)
- (%aliases)))
- (date (assq-ref alist 'author-date))
- (relative-date (assq-ref alist 'author-relative-date)))
- (when (zero? index)
- (hashtable-set! result 'last-updater author)
- (hashtable-set! result 'last-updated-date (unix-time->date date))
- (hashtable-set! result 'last-updated-relative-date relative-date))
- (hashtable-set! result 'creator author)
- (hashtable-set! result 'created-date (unix-time->date date))
- (hashtable-set! result 'created-relative-date relative-date)
- (post author date relative-date))))))
- rcons get-line port)))
+ (reverse
+ (port-transduce
+ (compose (tenumerate)
+ (tmap (match-lambda
+ ((index . line)
+ (let* ((alist (call-with-input-string line read))
+ (author (resolve-alias (assq-ref alist 'author)
+ (%aliases)))
+ (date (assq-ref alist 'author-date))
+ (relative-date (assq-ref alist 'author-relative-date)))
+ (when (zero? index)
+ (hashtable-set! result 'last-updater author)
+ (hashtable-set! result 'last-updated-date (unix-time->date date))
+ (hashtable-set! result 'last-updated-relative-date relative-date))
+ (hashtable-set! result 'creator author)
+ (hashtable-set! result 'created-date (unix-time->date date))
+ (hashtable-set! result 'created-relative-date relative-date)
+ (post author date relative-date))))))
+ rcons get-line port))))
"git" "log" "--follow"
(string-append "--format=format:("
"(author . \"%an\")"