1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

etc: committer: Fix crashes when inputs only change order.

* etc/committer.scm.in (change-commit-message): Fix handling when package
inputs are the same but in different order.

Change-Id: I8760a7c8fb57c82d657b239a50c973ba81f9781f
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Hartmut Goebel
2025-10-24 20:18:04 +02:00
committed by Ludovic Courtès
parent 81a066eb91
commit ef04d631bd

View File

@@ -303,6 +303,7 @@ corresponding to the top-level definition containing the staged changes."
(or (equal? old-values new-values) (or (equal? old-values new-values)
(let ((removed (lset-difference equal? old-values new-values)) (let ((removed (lset-difference equal? old-values new-values))
(added (lset-difference equal? new-values old-values))) (added (lset-difference equal? new-values old-values)))
(unless (and (null? added) (null? removed))
(format port (format port
"[~a]: ~a~%" field "[~a]: ~a~%" field
(break-string (break-string
@@ -318,7 +319,7 @@ corresponding to the top-level definition containing the staged changes."
((removed added) ((removed added)
(format #f "Remove ~a; add ~a." (format #f "Remove ~a; add ~a."
(listify removed) (listify removed)
(listify added)))))))))) (listify added)))))))))))
'(inputs propagated-inputs native-inputs))) '(inputs propagated-inputs native-inputs)))
(define* (add-commit-message file-name variable-name (define* (add-commit-message file-name variable-name