guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

86/86: etc/committer: Recompute hunks before processing changes.


From: guix-commits
Subject: 86/86: etc/committer: Recompute hunks before processing changes.
Date: Wed, 7 Apr 2021 21:22:19 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 83991a34d5c1d4985e54dd029a81412277ad062a
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Thu Apr 8 03:08:00 2021 +0200

    etc/committer: Recompute hunks before processing changes.
    
    * etc/committer.scm.in (main): Re-evaluate diff-info after processing
    insertions.
---
 etc/committer.scm.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/etc/committer.scm.in b/etc/committer.scm.in
index 376e1ac..7991dc7 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]