mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-03-15 11:10:29 -07:00
perf(magit): use /usr/bin/git on macos
Inexplicably, the built-in git on MacOS is many orders of magnitude faster than the external builds provided by Homebrew/Macports, so use that there. Emacs on MacOS needs all the (performance) help it can get and, fortunately, the bundled git is 2.23 or newer on (at least) MacOS 10.15 (Catalina) and newer, so this should be a relatively safe bet without the need for version checks.
This commit is contained in:
parent
d23bbe8772
commit
d23abed66d
1 changed files with 8 additions and 1 deletions
|
|
@ -71,7 +71,14 @@ FUNCTION
|
|||
;; enough that a non-absolute path can notably slow it down,
|
||||
;; especially on MacOS and Windows, so I resolve it once, the first
|
||||
;; time it's needed.
|
||||
magit-git-executable (or (executable-find magit-git-executable) "git"))
|
||||
magit-git-executable (or
|
||||
;; PERF: Inexplicably, the built-in git on MacOS
|
||||
;; is much faster than the one provided by
|
||||
;; homebrew, so use that instead there.
|
||||
(and (featurep :system 'macos)
|
||||
(file-exists-p! "/usr/bin/git"))
|
||||
(executable-find magit-git-executable)
|
||||
"git"))
|
||||
|
||||
;; Turn ref links into clickable buttons.
|
||||
(add-hook 'magit-process-mode-hook #'goto-address-mode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue