diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-08-29 16:10:11 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-08-29 16:10:11 +0200 |
| commit | 78e2ff07dfb385e7093b04cd57fb0677852dc31b (patch) | |
| tree | 6b2dee0dc11956ae1db6e38928d729049271efe5 | |
| parent | 0f53ad4044829ba0d677af9b713a03d96f361dfa (diff) | |
magit-version: Suppress warning during startup
| -rw-r--r-- | lisp/magit.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/magit.el b/lisp/magit.el index 72f0bde..e6172da 100644 --- a/lisp/magit.el +++ b/lisp/magit.el @@ -580,7 +580,7 @@ is run in the top-level directory of the current working tree." Use the function by the same name instead of this variable.") ;;;###autoload -(defun magit-version (&optional print-dest interactive) +(defun magit-version (&optional print-dest interactive nowarn) "Return the version of Magit currently in use. If optional argument PRINT-DEST is non-nil, also print the used @@ -702,8 +702,7 @@ the output in the kill ring. (setq magit-version 'error) (when magit-version (push magit-version debug)) - (unless (equal (getenv "CI") "true") - ;; The repository is a sparse clone. + (unless (or nowarn (equal (getenv "CI") "true")) (message "Cannot determine Magit's version %S" debug))) magit-version)) @@ -783,7 +782,7 @@ For X11 something like ~/.xinitrc should work.\n" (unless (bound-and-true-p byte-compile-current-file) (if after-init-time (progn (magit-startup-asserts) - (magit-version)) + (magit-version nil nil t)) (add-hook 'after-init-hook #'magit-startup-asserts t) (add-hook 'after-init-hook #'magit-version t))) |
