Skip to content

Commit 99a4763

Browse files
committed
legit: fossil-commit-count
1 parent 42f8ad3 commit 99a4763

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

extensions/legit/porcelain.lisp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,17 @@ summary: test
611611
(t
612612
(porcelain-error "commit-count not implemented for VCS: ~a" *vcs*))))
613613

614+
(defun %not-fossil-commit-line (line)
615+
(str:starts-with-p "+++ no more data" line))
616+
617+
(defun fossil-commit-count ()
618+
;; Not really tested in Lem.
619+
(length
620+
;; Does the timeline command always end with "+++ no more data (1) +++" ?
621+
(remove-if #'%not-fossil-commit-line
622+
(str:lines
623+
(run-fossil (list "timeline" "--oneline"))))))
624+
614625
;; stage, add files.
615626
(defun git-stage (file)
616627
(run-git (list "add" file)))

0 commit comments

Comments
 (0)