undo logic specific to use as git hook, for now
i've got a more complete fix in stash but it's taking too long to complete and i want your cli to work again! this should do it.
This commit is contained in:
parent
57f8535875
commit
1a3b8b1aa1
1 changed files with 1 additions and 15 deletions
16
main.scm
16
main.scm
|
@ -180,20 +180,6 @@ string-block
|
||||||
(unless (in-git-directory?)
|
(unless (in-git-directory?)
|
||||||
(bail 1 "woops that's not a bare git directory"))
|
(bail 1 "woops that's not a bare git directory"))
|
||||||
|
|
||||||
(let ((head-ref (call-with-input-pipe "git symbolic-ref -q HEAD" read-line)))
|
(generate-html-files))
|
||||||
|
|
||||||
(when (null? head-ref)
|
|
||||||
(bail 1 "no HEAD reference is set"))
|
|
||||||
|
|
||||||
;; loop over the changed refs
|
|
||||||
;; if the HEAD ref is changed, generate html for it
|
|
||||||
((flip for-each)
|
|
||||||
(read-lines)
|
|
||||||
(lambda (line)
|
|
||||||
;; isn't there a better way to destructure a list?
|
|
||||||
;; egg 'matchable' has match-let
|
|
||||||
(let-values (((before after ref) (apply values (string-split line))))
|
|
||||||
(when (equal? ref head-ref)
|
|
||||||
(generate-html-files)))))))
|
|
||||||
|
|
||||||
(main (command-line-arguments))
|
(main (command-line-arguments))
|
||||||
|
|
Loading…
Reference in a new issue