emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit 6c4ff54a08 3/9: magit-startup-asserts: Don't ch


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 6c4ff54a08 3/9: magit-startup-asserts: Don't check Git version when building Magit
Date: Tue, 22 Feb 2022 05:58:10 -0500 (EST)

branch: elpa/git-commit
commit 6c4ff54a0836985fac6d72c7e4bfeff964775efe
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    magit-startup-asserts: Don't check Git version when building Magit
    
    Git isn't required while building Magit and apparently some people
    and/or distributions build Magit before Git.  Continue to support
    that but make it a bit more explicit what is going on.  Skip the
    version check completely while compiling.
---
 lisp/magit.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/magit.el b/lisp/magit.el
index 7241240a9e..68fd8e95d5 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -655,9 +655,9 @@ 
https://github.com/magit/magit/wiki/Don't-set-$GIT_DIR-and-alike" val))
     (setenv "GIT_WORK_TREE")
     (message "Magit unset $GIT_WORK_TREE (was %S).  See \
 https://github.com/magit/magit/wiki/Don't-set-$GIT_DIR-and-alike" val))
-  (let ((version (magit-git-version)))
-    (when (and version
-               (version< version magit--minimal-git))
+  ;; Git isn't required while building Magit.
+  (cl-eval-when (load eval)
+    (when (magit-git-version< magit--minimal-git)
       (display-warning 'magit (format "\
 Magit requires Git >= %s, you are using %s.
 
@@ -672,7 +672,7 @@ For X11 something like ~/.xinitrc should work.
 
 If you use Tramp to work inside remote Git repositories, then you
 have to make sure a suitable Git is used on the remote machines
-too.\n" magit--minimal-git version) :error)))
+too.\n" magit--minimal-git (magit-git-version)) :error)))
   (when (version< emacs-version magit--minimal-emacs)
     (display-warning 'magit (format "\
 Magit requires Emacs >= %s, you are using %s.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]