etc/committer: Define delay duration as a variable.
* etc/committer.scm.in (%delay): New variable. (main): Use it.master
parent
c8c3afe848
commit
56270c1275
|
@ -236,6 +236,8 @@ modifying."
|
||||||
(cons* new (old-sexp (first hunks)) hunks)))
|
(cons* new (old-sexp (first hunks)) hunks)))
|
||||||
(group-hunks-by-sexp hunks)))
|
(group-hunks-by-sexp hunks)))
|
||||||
|
|
||||||
|
(define %delay 1000)
|
||||||
|
|
||||||
(define (main . args)
|
(define (main . args)
|
||||||
(match (diff-info)
|
(match (diff-info)
|
||||||
(()
|
(()
|
||||||
|
@ -263,10 +265,10 @@ modifying."
|
||||||
(let ((port (open-pipe* OPEN_WRITE "git" "commit" "-F" "-")))
|
(let ((port (open-pipe* OPEN_WRITE "git" "commit" "-F" "-")))
|
||||||
(add-commit-message (hunk-file-name hunk)
|
(add-commit-message (hunk-file-name hunk)
|
||||||
variable-name port)
|
variable-name port)
|
||||||
(sleep 1)
|
(usleep %delay)
|
||||||
(unless (eqv? 0 (status:exit-val (close-pipe port)))
|
(unless (eqv? 0 (status:exit-val (close-pipe port)))
|
||||||
(error "Cannot commit"))))
|
(error "Cannot commit"))))
|
||||||
(sleep 1))
|
(usleep %delay))
|
||||||
definitions)
|
definitions)
|
||||||
|
|
||||||
;; Changes.
|
;; Changes.
|
||||||
|
@ -280,7 +282,7 @@ modifying."
|
||||||
(hunk->patch hunk port)
|
(hunk->patch hunk port)
|
||||||
(unless (eqv? 0 (status:exit-val (close-pipe port)))
|
(unless (eqv? 0 (status:exit-val (close-pipe port)))
|
||||||
(error "Cannot apply")))
|
(error "Cannot apply")))
|
||||||
(sleep 1))
|
(usleep %delay))
|
||||||
hunks)
|
hunks)
|
||||||
(change-commit-message (hunk-file-name (first hunks))
|
(change-commit-message (hunk-file-name (first hunks))
|
||||||
old new
|
old new
|
||||||
|
@ -289,7 +291,7 @@ modifying."
|
||||||
(change-commit-message (hunk-file-name (first hunks))
|
(change-commit-message (hunk-file-name (first hunks))
|
||||||
old new
|
old new
|
||||||
port)
|
port)
|
||||||
(sleep 1)
|
(usleep %delay)
|
||||||
(unless (eqv? 0 (status:exit-val (close-pipe port)))
|
(unless (eqv? 0 (status:exit-val (close-pipe port)))
|
||||||
(error "Cannot commit")))))
|
(error "Cannot commit")))))
|
||||||
(new+old+hunks changes))))))
|
(new+old+hunks changes))))))
|
||||||
|
|
Reference in New Issue