summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tissue/git.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/tissue/git.scm b/tissue/git.scm
index 944842d..4b7f7c7 100644
--- a/tissue/git.scm
+++ b/tissue/git.scm
@@ -20,6 +20,7 @@
#:use-module (rnrs arithmetic bitwise)
#:use-module (rnrs io ports)
#:use-module (srfi srfi-9)
+ #:use-module (srfi srfi-19)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-171)
#:use-module (git)
@@ -40,6 +41,7 @@
#:use-module (tissue utils)
#:export (git-top-level
current-git-repository
+ commit-date
git-tracked-files))
;; We bind additional functions from libgit2 that are not already
@@ -182,6 +184,13 @@ repository."
"Return the current git repository."
(repository-open (git-top-level)))
+(define (commit-date commit)
+ (time-monotonic->date
+ (make-time time-monotonic
+ 0
+ (commit-time commit))
+ (* 60 (commit-time-offset commit))))
+
(define (git-tracked-files repository)
"Return a list of all files tracked in REPOSITORY. The returned
filenames are relative to the top-level directory of REPOSITORY and do