mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06: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:
parent
81a066eb91
commit
ef04d631bd
1 changed files with 17 additions and 16 deletions
|
|
@ -303,22 +303,23 @@ corresponding to the top-level definition containing the staged changes."
|
|||
(or (equal? old-values new-values)
|
||||
(let ((removed (lset-difference equal? old-values new-values))
|
||||
(added (lset-difference equal? new-values old-values)))
|
||||
(format port
|
||||
"[~a]: ~a~%" field
|
||||
(break-string
|
||||
;; A dependency can be a list of (pkg output).
|
||||
(match (list (map object->string removed)
|
||||
(map object->string added))
|
||||
((() added)
|
||||
(format #f "Add ~a."
|
||||
(listify added)))
|
||||
((removed ())
|
||||
(format #f "Remove ~a."
|
||||
(listify removed)))
|
||||
((removed added)
|
||||
(format #f "Remove ~a; add ~a."
|
||||
(listify removed)
|
||||
(listify added))))))))))
|
||||
(unless (and (null? added) (null? removed))
|
||||
(format port
|
||||
"[~a]: ~a~%" field
|
||||
(break-string
|
||||
;; A dependency can be a list of (pkg output).
|
||||
(match (list (map object->string removed)
|
||||
(map object->string added))
|
||||
((() added)
|
||||
(format #f "Add ~a."
|
||||
(listify added)))
|
||||
((removed ())
|
||||
(format #f "Remove ~a."
|
||||
(listify removed)))
|
||||
((removed added)
|
||||
(format #f "Remove ~a; add ~a."
|
||||
(listify removed)
|
||||
(listify added)))))))))))
|
||||
'(inputs propagated-inputs native-inputs)))
|
||||
|
||||
(define* (add-commit-message file-name variable-name
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue