branch: elpa/magit
commit 3e54579995cb0a58d57ab2b0a76ea0f5cbf656cc
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    magit-gitignore-on-system: Make only inapt if variable is unset
---
 lisp/magit-gitignore.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/magit-gitignore.el b/lisp/magit-gitignore.el
index 4546ba70ea..942f3b1a55 100644
--- a/lisp/magit-gitignore.el
+++ b/lisp/magit-gitignore.el
@@ -87,9 +87,10 @@ Rules in that file only affects this clone of the 
repository."
 (transient-define-suffix magit-gitignore-on-system (rule)
   "Add the Git ignore RULE to the file specified by `core.excludesFile'.
 Rules that are defined in that file affect all local repositories."
-  :if (##magit-get "core.excludesfile")
+  :inapt-if-not (##magit-get "core.excludesfile")
   :description (##format "privately for all repositories (%s)"
-                         (magit-get "core.excludesfile"))
+                         (or (magit-get "core.excludesfile")
+                             "core.excludesfile is not set"))
   (interactive (list (magit-gitignore-read-pattern)))
   (magit--gitignore rule
                     (or (magit-get "core.excludesFile")

Reply via email to