Merge pull request #2518 from bepvte/bepvte/git-shallower

Make doom purge -g more effective
This commit is contained in:
Henrik Lissner 2020-02-11 03:24:56 -05:00 committed by GitHub
commit 2af574eb0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -272,7 +272,8 @@ declaration) or dependency thereof that hasn't already been."
(straight--call "git" "clean" "-ffd")
(if (not (car (straight--call "git" "replace" "--graft" "HEAD")))
(print! (info "\033[Krepos/%s is already compact\033[1A" repo))
(straight--call "git" "gc")
(straight--call "git" "reflog" "expire" "--expire=all" "--all")
(straight--call "git" "gc" "--prune=now")
(print! (success "\033[KRegrafted repos/%s (from %0.1fKB to %0.1fKB)")
repo before-size (doom-directory-size default-directory))
(print-group! (print! "%s" (straight--process-get-output))))