mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 21:46:35 +01:00
etc/committer: Define delay duration as a variable.
* etc/committer.scm.in (%delay): New variable. (main): Use it.
This commit is contained in:
parent
c8c3afe848
commit
56270c1275
1 changed files with 6 additions and 4 deletions
|
@ -236,6 +236,8 @@ (define (new+old+hunks hunks)
|
|||
(cons* new (old-sexp (first hunks)) hunks)))
|
||||
(group-hunks-by-sexp hunks)))
|
||||
|
||||
(define %delay 1000)
|
||||
|
||||
(define (main . args)
|
||||
(match (diff-info)
|
||||
(()
|
||||
|
@ -263,10 +265,10 @@ (define (main . args)
|
|||
(let ((port (open-pipe* OPEN_WRITE "git" "commit" "-F" "-")))
|
||||
(add-commit-message (hunk-file-name hunk)
|
||||
variable-name port)
|
||||
(sleep 1)
|
||||
(usleep %delay)
|
||||
(unless (eqv? 0 (status:exit-val (close-pipe port)))
|
||||
(error "Cannot commit"))))
|
||||
(sleep 1))
|
||||
(usleep %delay))
|
||||
definitions)
|
||||
|
||||
;; Changes.
|
||||
|
@ -280,7 +282,7 @@ (define (main . args)
|
|||
(hunk->patch hunk port)
|
||||
(unless (eqv? 0 (status:exit-val (close-pipe port)))
|
||||
(error "Cannot apply")))
|
||||
(sleep 1))
|
||||
(usleep %delay))
|
||||
hunks)
|
||||
(change-commit-message (hunk-file-name (first hunks))
|
||||
old new
|
||||
|
@ -289,7 +291,7 @@ (define (main . args)
|
|||
(change-commit-message (hunk-file-name (first hunks))
|
||||
old new
|
||||
port)
|
||||
(sleep 1)
|
||||
(usleep %delay)
|
||||
(unless (eqv? 0 (status:exit-val (close-pipe port)))
|
||||
(error "Cannot commit")))))
|
||||
(new+old+hunks changes))))))
|
||||
|
|
Loading…
Reference in a new issue