summary refs log tree commit diff
path: root/etc/committer.scm.in
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2021-04-08 03:08:00 +0200
committerRicardo Wurmus <rekado@elephly.net>2021-04-08 03:10:14 +0200
commit83991a34d5c1d4985e54dd029a81412277ad062a (patch)
treeb1d4d8482eaa1c5d73e6c1473717dbf5e9dacc1e /etc/committer.scm.in
parent43fb6b765d82ea5acfdc83f61472d99594ee1cbf (diff)
downloadguix-83991a34d5c1d4985e54dd029a81412277ad062a.tar.gz
etc/committer: Recompute hunks before processing changes.
* etc/committer.scm.in (main): Re-evaluate diff-info after processing
insertions.
Diffstat (limited to 'etc/committer.scm.in')
-rwxr-xr-xetc/committer.scm.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/committer.scm.in b/etc/committer.scm.in
index 376e1ac063..7991dc7430 100755
--- a/etc/committer.scm.in
+++ b/etc/committer.scm.in
@@ -306,6 +306,8 @@ modifying."
                       (usleep %delay)
                       (unless (eqv? 0 (status:exit-val (close-pipe port)))
                         (error "Cannot commit")))))
-                 (new+old+hunks changes))))))
+                 ;; XXX: we recompute the hunks here because previous
+                 ;; insertions lead to offsets.
+                 (new+old+hunks (diff-info)))))))
 
 (main)