Emacs: file-system-info was introduced in 27.

This commit is contained in:
tastytea 2020-04-16 15:05:19 +02:00
parent ecf97b0209
commit d355809ddd
1 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
;;; package-management.el --- Initialize package management -*- lexical-binding: t; -*-
;; Time-stamp: <2020-04-10T14:40:50+0200>
;; Time-stamp: <2020-04-16T15:05:12+0200>
;;; Commentary:
;; * Set up straight
@ -21,8 +21,9 @@
"Cache the autoloads of all packages in a single file.")
;; 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.
(when (or (< emacs-major-version 27) ; file-system-info was introduced in 27.
(< (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."))