Emacs: Only make shallow clones when the disk space is < 5 GiB.
This commit is contained in:
parent
95432bd5b5
commit
87501a731c
|
@ -1,6 +1,6 @@
|
|||
;;; package-management.el --- Initialize package management -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-04-10T14:20:36+0200>
|
||||
;; Time-stamp: <2020-04-10T14:40:50+0200>
|
||||
|
||||
;;; Commentary:
|
||||
;; * Set up straight
|
||||
|
@ -19,8 +19,12 @@
|
|||
"Makes use-package invoke straight.el to install the package.")
|
||||
(customize-set-variable 'straight-cache-autoloads t
|
||||
"Cache the autoloads of all packages in a single file.")
|
||||
(customize-set-variable 'straight-vc-git-default-clone-depth 1
|
||||
"Make shallow clones to save space.")
|
||||
|
||||
;; Use shallow clones if available disk space is under 5 GiB.
|
||||
(when (< (nth 2 (file-system-info user-emacs-directory))
|
||||
(* 1024 1024 1024 5)) ; 5 GiB.
|
||||
(customize-set-variable 'straight-vc-git-default-clone-depth 1
|
||||
"Make shallow clones to save space."))
|
||||
|
||||
(customize-set-variable 'straight-repository-branch "master")
|
||||
;; Bootstrap straight.
|
||||
|
|
Loading…
Reference in New Issue