Check that a revision has been provided before trying to parse it
When setting up Tekuti for the first time the ‘compute-bogus-comments’ will get the current commit passed in and try to get the parent. Since there is only the “initial commit” at this stage it will get ‘#f’ as the parent commit and pass it in to ‘fold-commits’. Trying to parse revision ‘#f’ will surely fail. The ‘fold-commits’ function already expects that ‘rev’ might be empty, so this should work out fine.
This commit is contained in:
parent
ae3d83d5f2
commit
480c050275
1 changed files with 1 additions and 1 deletions
|
@ -334,7 +334,7 @@
|
||||||
(cons (string->symbol k) v))))))
|
(cons (string->symbol k) v))))))
|
||||||
|
|
||||||
(define (fold-commits f rev seed)
|
(define (fold-commits f rev seed)
|
||||||
(let lp ((rev (git-rev-parse rev)) (seed seed))
|
(let lp ((rev (and rev (git-rev-parse rev))) (seed seed))
|
||||||
(if rev
|
(if rev
|
||||||
(let ((commit (parse-commit rev)))
|
(let ((commit (parse-commit rev)))
|
||||||
(lp (assq-ref commit 'parent)
|
(lp (assq-ref commit 'parent)
|
||||||
|
|
Loading…
Reference in a new issue