Reduce minimum required git to 2.23
Thanks to raxod502/straight.el@7ca94a7, which was included in 3329448bd
.
This in particular reduces the burden for Ubuntu users.
Relevant to #5088, #5096
This commit is contained in:
parent
3329448bd5
commit
1a5f4afd0d
4 changed files with 11 additions and 29 deletions
|
@ -98,7 +98,7 @@ Check out [the FAQ][FAQ] for answers to common questions about the project.
|
||||||
|
|
||||||
|
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
+ Git 2.28+
|
+ Git 2.23+
|
||||||
+ Emacs 26.3+ (*27.2 is recommended*, or [native-comp](https://www.emacswiki.org/emacs/GccEmacs)).
|
+ Emacs 26.3+ (*27.2 is recommended*, or [native-comp](https://www.emacswiki.org/emacs/GccEmacs)).
|
||||||
+ [ripgrep] 11.0+
|
+ [ripgrep] 11.0+
|
||||||
+ GNU `find`
|
+ GNU `find`
|
||||||
|
|
|
@ -71,10 +71,10 @@ in."
|
||||||
(and (string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version)
|
(and (string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version)
|
||||||
(match-string 0 version))))
|
(match-string 0 version))))
|
||||||
(if version
|
(if version
|
||||||
(when (version< version "2.28")
|
(when (version< version "2.23")
|
||||||
(error! "Git %s detected! Doom requires git 2.28 or newer!"
|
(error! "Git %s detected! Doom requires git 2.23 or newer!"
|
||||||
version))
|
version))
|
||||||
(warn! "Cannot determine Git version. Doom requires git 2.28 or newer!")))))
|
(warn! "Cannot determine Git version. Doom requires git 2.23 or newer!")))))
|
||||||
|
|
||||||
(unless (executable-find "rg")
|
(unless (executable-find "rg")
|
||||||
(error! "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))
|
(error! "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))
|
||||||
|
|
|
@ -132,8 +132,8 @@ uses a straight or package.el command directly).")
|
||||||
(and (string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version)
|
(and (string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version)
|
||||||
(match-string 0 version))))
|
(match-string 0 version))))
|
||||||
(if version
|
(if version
|
||||||
(when (version< version "2.28")
|
(when (version< version "2.23")
|
||||||
(user-error "Git %s detected! Doom requires git 2.28 or newer!"
|
(user-error "Git %s detected! Doom requires git 2.23 or newer!"
|
||||||
version)))))
|
version)))))
|
||||||
(print! (start "Installing straight..."))
|
(print! (start "Installing straight..."))
|
||||||
(print-group!
|
(print-group!
|
||||||
|
@ -159,10 +159,8 @@ uses a straight or package.el command directly).")
|
||||||
"--branch" straight-repository-branch))
|
"--branch" straight-repository-branch))
|
||||||
(make-directory repo-dir 'recursive)
|
(make-directory repo-dir 'recursive)
|
||||||
(let ((default-directory repo-dir))
|
(let ((default-directory repo-dir))
|
||||||
;; git init's -b switch was introduced in 2.28. As much as I'd
|
(funcall call "git" "init")
|
||||||
;; like to, the dependency is unavoidable because straight.el
|
(funcall call "git" "branch" "-m" straight-repository-branch)
|
||||||
;; uses it internally.
|
|
||||||
(funcall call "git" "init" "-b" straight-repository-branch)
|
|
||||||
(funcall call "git" "remote" "add" "origin" repo-url
|
(funcall call "git" "remote" "add" "origin" repo-url
|
||||||
"--master" straight-repository-branch)
|
"--master" straight-repository-branch)
|
||||||
(funcall call "git" "fetch" "origin" pin
|
(funcall call "git" "fetch" "origin" pin
|
||||||
|
|
|
@ -96,7 +96,7 @@ us know!
|
||||||
* Install
|
* Install
|
||||||
This is what you'll have installed by the end of this section:
|
This is what you'll have installed by the end of this section:
|
||||||
|
|
||||||
- Git 2.28+
|
- Git 2.23+
|
||||||
- Emacs 26.3+ *(27.2 is recommended, or [[https://www.emacswiki.org/emacs/GccEmacs][native-comp]])*
|
- Emacs 26.3+ *(27.2 is recommended, or [[https://www.emacswiki.org/emacs/GccEmacs][native-comp]])*
|
||||||
- [[https://github.com/BurntSushi/ripgrep][ripgrep]] 11.0+
|
- [[https://github.com/BurntSushi/ripgrep][ripgrep]] 11.0+
|
||||||
- GNU Find
|
- GNU Find
|
||||||
|
@ -119,24 +119,8 @@ In the unusual case that Emacs 26.x is unavailable through your package manager,
|
||||||
you'll have to [[https://www.gnu.org/software/emacs/manual/html_node/efaq/Installing-Emacs.html][build it from source]], but here are installation instructions for many popular Linux distributions:
|
you'll have to [[https://www.gnu.org/software/emacs/manual/html_node/efaq/Installing-Emacs.html][build it from source]], but here are installation instructions for many popular Linux distributions:
|
||||||
|
|
||||||
**** Ubuntu
|
**** Ubuntu
|
||||||
There are two challenges for Ubuntu users:
|
Emacs 27.x is not available through Ubuntu's package manager out-of-the-box. To
|
||||||
|
get around this you'll need to install Emacs through a PPA:
|
||||||
+ Ubuntu <= 18.04 only provide Emacs <= 25.3 (Doom requires 26.3+)
|
|
||||||
+ Ubuntu <= 20.04 only provide git <= 2.25.1 (Doom requires 2.28+)
|
|
||||||
|
|
||||||
To get around these:
|
|
||||||
|
|
||||||
***** Git
|
|
||||||
To install Git 2.28:
|
|
||||||
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
add-apt-repository ppa:git-core/ppa
|
|
||||||
apt update
|
|
||||||
apt install git
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
***** Emacs
|
|
||||||
To install Emacs 27, you'll need either a PPA or Snap:
|
|
||||||
|
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
add-apt-repository ppa:kelleyk/emacs
|
add-apt-repository ppa:kelleyk/emacs
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue