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:
committed by
Ludovic Courtès
parent
81a066eb91
commit
ef04d631bd
@@ -303,22 +303,23 @@ 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)))
|
||||||
(format port
|
(unless (and (null? added) (null? removed))
|
||||||
"[~a]: ~a~%" field
|
(format port
|
||||||
(break-string
|
"[~a]: ~a~%" field
|
||||||
;; A dependency can be a list of (pkg output).
|
(break-string
|
||||||
(match (list (map object->string removed)
|
;; A dependency can be a list of (pkg output).
|
||||||
(map object->string added))
|
(match (list (map object->string removed)
|
||||||
((() added)
|
(map object->string added))
|
||||||
(format #f "Add ~a."
|
((() added)
|
||||||
(listify added)))
|
(format #f "Add ~a."
|
||||||
((removed ())
|
(listify added)))
|
||||||
(format #f "Remove ~a."
|
((removed ())
|
||||||
(listify removed)))
|
(format #f "Remove ~a."
|
||||||
((removed added)
|
(listify removed)))
|
||||||
(format #f "Remove ~a; add ~a."
|
((removed added)
|
||||||
(listify removed)
|
(format #f "Remove ~a; add ~a."
|
||||||
(listify added))))))))))
|
(listify removed)
|
||||||
|
(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
|
||||||
|
|||||||
Reference in New Issue
Block a user