Preliminary work on annotations.
This commit is contained in:
parent
8d3bb51290
commit
408b2b2143
1 changed files with 18 additions and 0 deletions
|
@ -99,4 +99,22 @@
|
||||||
(cons fname
|
(cons fname
|
||||||
(ldict-ref res status '())))))))))
|
(ldict-ref res status '())))))))))
|
||||||
|
|
||||||
|
;; Returns detailed file annotation with each line being represented
|
||||||
|
;; by dictionary with keys from git output
|
||||||
|
(define (git-blame repo fname)
|
||||||
|
(let loop ((lines ((git repo) 'annotate '--porcelain fname))
|
||||||
|
(blames '()))
|
||||||
|
(if (null? lines)
|
||||||
|
blames
|
||||||
|
(let ((line (car lines))
|
||||||
|
(rblames (if (null? blames)
|
||||||
|
'()
|
||||||
|
(cdr blames)))
|
||||||
|
(blame (if (null? blames)
|
||||||
|
(make-ldict)
|
||||||
|
(car blames))))
|
||||||
|
(loop (cdr lines)
|
||||||
|
(cons blame
|
||||||
|
rblames))))))
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue