cli/packages: fix update output on unpinned packages

- don't print output of git command
- count commits and output log
This commit is contained in:
Itai Y. Efrat 2021-06-04 15:20:42 +03:00
parent 46c89d350e
commit f9a1d80936

View file

@ -402,9 +402,10 @@ declaration) or dependency thereof that hasn't already been."
(print! (start "\033[K(%d/%d) Fetching %s...%s") i total package esc) (print! (start "\033[K(%d/%d) Fetching %s...%s") i total package esc)
(doom--straight-with (straight-vc-fetch-from-remote recipe) (doom--straight-with (straight-vc-fetch-from-remote recipe)
(when .it (when .it
(setq output .output)
(straight-merge-package package) (straight-merge-package package)
(setq target-ref (straight-vc-get-commit type local-repo)) (setq target-ref (straight-vc-get-commit type local-repo))
(setq output (doom--commit-log-between ref target-ref)
commits (length (split-string output "\n" t)))
(or (not (doom--same-commit-p target-ref ref)) (or (not (doom--same-commit-p target-ref ref))
(cl-return))))) (cl-return)))))