Add "X updated" notice after package is updated

To make it clearer what package was just updated after spewing a lot of
git log output.
This commit is contained in:
Henrik Lissner 2019-11-22 16:15:06 -05:00
parent c9ae1f0a30
commit 4351474bf3
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -152,20 +152,21 @@ declaration) or dependency thereof that hasn't already been."
(straight-merge-package package) (straight-merge-package package)
(let ((newcommit (straight-vc-get-commit type local-repo))) (let ((newcommit (straight-vc-get-commit type local-repo)))
(if (string= commit newcommit) (if (string= commit newcommit)
(print! (info "(%d/%d) %s is up-to-date") i total package) (print! (start "(%d/%d) %s is up-to-date") i total package)
(ignore-errors (ignore-errors
(delete-directory (straight--build-dir package) 'recursive)) (delete-directory (straight--build-dir package) 'recursive))
(puthash package t straight--packages-to-rebuild) (puthash package t straight--packages-to-rebuild)
(print! (success "(%d/%d) %s updated (%s -> %s)") i total package (print! (info "(%d/%d) Updating %s...") i total package)
(substring commit 0 7)
(substring newcommit 0 7))
(unless (string-empty-p output) (unless (string-empty-p output)
(print-group! (print-group!
(print! (info "%s") output) (print! (info "%s") output)
(when (eq type 'git) (when (eq type 'git)
(straight--call "git" "log" "--oneline" newcommit (concat "^" commit)) (straight--call "git" "log" "--oneline" newcommit (concat "^" commit))
(print-group! (print-group!
(print! "%s" (straight--process-get-output)))))))))) (print! "%s" (straight--process-get-output))))))
(print! (success "(%d/%d) %s updated (%s -> %s)") i total package
(substring commit 0 7)
(substring newcommit 0 7))))))
(cl-incf i)) (cl-incf i))
(user-error (user-error
(signal 'user-error (error-message-string e))) (signal 'user-error (error-message-string e)))