make doom purge -g more aggressive

Reflog keeps the history of every reset, so expiring it allows us to
remove more older commits. git gc by default only cleans for 2 week old
objects, so I made it more aggressive
This commit is contained in:
Paul Oppenheimer 2020-02-10 20:18:51 -05:00
parent ae75326a40
commit 0a463673c9

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))))