Skip to content

Commit

Permalink
Reduce minimum required git to 2.23
Browse files Browse the repository at this point in the history
Thanks to radian-software/straight.el@7ca94a7, which was included in 3329448.
This in particular reduces the burden for Ubuntu users.

Relevant to doomemacs#5088, doomemacs#5096
  • Loading branch information
hlissner committed Jun 1, 2021
1 parent 3329448 commit 1a5f4af
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Check out [the FAQ][FAQ] for answers to common questions about the project.


# Prerequisites
+ Git 2.28+
+ Git 2.23+
+ Emacs 26.3+ (*27.2 is recommended*, or [native-comp](https://www.emacswiki.org/emacs/GccEmacs)).
+ [ripgrep] 11.0+
+ GNU `find`
Expand Down
6 changes: 3 additions & 3 deletions core/cli/doctor.el
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ in."
(and (string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version)
(match-string 0 version))))
(if version
(when (version< version "2.28")
(error! "Git %s detected! Doom requires git 2.28 or newer!"
(when (version< version "2.23")
(error! "Git %s detected! Doom requires git 2.23 or newer!"
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")
(error! "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))
Expand Down
10 changes: 4 additions & 6 deletions core/core-packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ uses a straight or package.el command directly).")
(and (string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version)
(match-string 0 version))))
(if version
(when (version< version "2.28")
(user-error "Git %s detected! Doom requires git 2.28 or newer!"
(when (version< version "2.23")
(user-error "Git %s detected! Doom requires git 2.23 or newer!"
version)))))
(print! (start "Installing straight..."))
(print-group!
Expand All @@ -159,10 +159,8 @@ uses a straight or package.el command directly).")
"--branch" straight-repository-branch))
(make-directory repo-dir 'recursive)
(let ((default-directory repo-dir))
;; git init's -b switch was introduced in 2.28. As much as I'd
;; like to, the dependency is unavoidable because straight.el
;; uses it internally.
(funcall call "git" "init" "-b" straight-repository-branch)
(funcall call "git" "init")
(funcall call "git" "branch" "-m" straight-repository-branch)
(funcall call "git" "remote" "add" "origin" repo-url
"--master" straight-repository-branch)
(funcall call "git" "fetch" "origin" pin
Expand Down
22 changes: 3 additions & 19 deletions docs/getting_started.org
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ us know!
* Install
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]])*
- [[https://github.com/BurntSushi/ripgrep][ripgrep]] 11.0+
- GNU Find
Expand All @@ -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:

**** Ubuntu
There are two challenges for Ubuntu users:

+ 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:
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:

#+BEGIN_SRC bash
add-apt-repository ppa:kelleyk/emacs
Expand Down

0 comments on commit 1a5f4af

Please sign in to comment.