Show repository status.
This commit is contained in:
parent
7a91e8f4f9
commit
67da5d9be1
2 changed files with 33 additions and 15 deletions
|
@ -41,7 +41,9 @@
|
|||
util-mail
|
||||
logging
|
||||
progress
|
||||
period)
|
||||
period
|
||||
util-git
|
||||
util-dict-list)
|
||||
|
||||
;; Command-line options and configurable parameters
|
||||
(define -needs-bank- (make-parameter #f))
|
||||
|
@ -162,6 +164,8 @@
|
|||
(-notify-months- 3)
|
||||
(-needs-bank- #t)
|
||||
(-action- 'notify))
|
||||
(-status () "Show members directory status"
|
||||
(-action- 'status))
|
||||
)
|
||||
|
||||
;; Print banner
|
||||
|
@ -342,6 +346,17 @@
|
|||
(make+send-reminder-email (car lst))
|
||||
(make+print-reminder-email (car lst)))
|
||||
(loop (cdr lst))))))))
|
||||
((status)
|
||||
(let ((status (git-status (*members-directory*))))
|
||||
(newline)
|
||||
(print "Repository " (*members-directory*) " status:")
|
||||
(if (ldict-ref status 'clean)
|
||||
(print " Repository up-to-date.")
|
||||
(let loop ((keys '(unknown untracked modified)))
|
||||
(when (not (null? keys))
|
||||
(when (ldict-contains? status (car keys))
|
||||
(print " " (car keys) ": " (length (ldict-ref status (car keys)))))
|
||||
(loop (cdr keys)))))))
|
||||
(else
|
||||
(print "Nothing to do."))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue