diff options
Diffstat (limited to 'tekuti/git.scm')
-rw-r--r-- | tekuti/git.scm | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/tekuti/git.scm b/tekuti/git.scm index b17c963..3c9df31 100644 --- a/tekuti/git.scm +++ b/tekuti/git.scm @@ -41,8 +41,7 @@ git git* ensure-git-repo git-ls-tree git-ls-subdirs git-mktree git-rev-parse git-hash-object git-update-ref - git-commit-tree git-rev-list git-revert git-last-update - git-latest-commits + git-commit-tree git-rev-list git-revert munge-tree munge-tree1 parse-commit commit-utc-timestamp @@ -192,35 +191,6 @@ (error "bad line2" line2)) (error "bad line1" line1))))))) -(define* (git-latest-commits rev n #:optional (git-dir *git-dir*)) - (let lp ((lines (string-split - (git "--git-dir" (expanduser git-dir) - "rev-list" "--pretty=format:%ar\t%s\t%an" - "-n" (number->string n) rev) #\newline)) - (ret '())) - (if (or (null? lines) - (and (null? (cdr lines)) (string-null? (car lines)))) - (reverse ret) - (lp (cddr lines) - (let ((line (cadr lines))) - (match-bind - "^([^\t]+)\t([^\t]+)\t(.*)$" line (_ sha1 subject author) - (cons `(,sha1 ,subject ,author) ret) - (error "bad line" line))))))) - - -(define* (git-last-update #:optional (git-dir *git-dir*)) - (let lp ((lines (string-split - (git "--git-dir" (expanduser git-dir) - "rev-list" "--pretty=format:%ar" "-n" "1" "HEAD") - #\newline)) - (ret '())) - (if (or (null? lines) - (and (null? (cdr lines)) (string-null? (car lines)))) - ret - (lp (cddr lines) - (cadr lines))))) - (define (git-hash-object contents) (string-trim-both (git* '("hash-object" "-w" "--stdin") #:input contents))) |