diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-04-08 02:59:55 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-04-08 03:10:14 +0200 |
commit | 56270c1275d8dcdec80c04c032079b694204052a (patch) | |
tree | 00091aed9b6b98ca903f1000d5efcdc1a32168fb /etc | |
parent | c8c3afe8485bd614692f13e1e8a4200136da1302 (diff) | |
download | guix-56270c1275d8dcdec80c04c032079b694204052a.tar guix-56270c1275d8dcdec80c04c032079b694204052a.tar.gz |
etc/committer: Define delay duration as a variable.
* etc/committer.scm.in (%delay): New variable.
(main): Use it.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/committer.scm.in | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/committer.scm.in b/etc/committer.scm.in index 824483e088..8744bae4a7 100755 --- a/etc/committer.scm.in +++ b/etc/committer.scm.in @@ -236,6 +236,8 @@ modifying." (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 @@ modifying." (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 @@ modifying." (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 @@ modifying." (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)))))) |