From 93d188e6bcbc864b874b6ca37ea2163f7fb32a96 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 May 2020 01:31:51 -0400 Subject: [PATCH] Resolve magit-git-executable to absolute path For minor performance gain for macOS/Windows users. Shouldn't make a difference on Linux. --- modules/tools/magit/config.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index ce2c785f2..54bbe57b7 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -16,7 +16,11 @@ ;; Don't autosave repo buffers. This is too magical, and saving can ;; trigger a bunch of unwanted side-effects, like save hooks and ;; formatters. Trust us to know what we're doing. - magit-save-repository-buffers nil) + magit-save-repository-buffers nil + ;; Magit runs git *a lot*. Having to scan your PATH so many times can + ;; add up with each invokation, especially on Catalina (macOS) or + ;; Windows, so we resolve it once. + magit-git-executable (executable-find magit-git-executable)) (defadvice! +magit-revert-repo-buffers-deferred-a (&rest _) :after '(magit-checkout magit-branch-and-checkout)