                             (straight-vc-commit-present-p recipe target-ref)))
                      (straight-vc-check-out-commit recipe target-ref)
                      (or (not (eq type 'git))
-                         (setq output (doom--commit-log-between ref target-ref)))
+                         (setq output (doom--commit-log-between ref target-ref)
+                               commits (length (split-string output "\n" t))))
                      (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo)))
 
                     ((print! (start "\033[K(%d/%d) Re-cloning %s...") i total local-repo esc)

                   (target-ref
                    (cdr (or (assoc local-repo pinned)
                             (assoc package pinned))))
                   output)
               (or (cond
                    ((not (stringp target-ref))

  (straight--process-with-result
   (straight--process-run
    "git" "log" "--oneline" "--no-merges"
    end-ref (concat "^" (regexp-quote start-ref)))
   (if success
       (string-trim-right (or stdout ""))
     (format "ERROR: Couldn't collect commit list because: %s" stderr))))

(defmacro doom--straight-with (form &rest body)
