aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-git.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2024-12-23 07:50:13 +0100
committerJonas Bernoulli <jonas@bernoul.li>2024-12-23 07:50:13 +0100
commitee7a2499cfe5c1b09c52d468864cc44d5897a721 (patch)
treeba0d349f1f05a23ac6ea9a54184aed8d72724077 /lisp/magit-git.el
parentfbb6addae6f17fc14f15e86ba7adfc1eb9f47529 (diff)
magit-toggle-git-debug: Improve documentation
Focus on documenting the command `magit-toggle-git-debug', at the expense of the documentation for the variable `magit-git-debug', which users don't really have to know about.
Diffstat (limited to 'lisp/magit-git.el')
-rw-r--r--lisp/magit-git.el32
1 files changed, 9 insertions, 23 deletions
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index b396f21..d0afadc 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -225,37 +225,23 @@ framework ultimately determines how the collection is displayed."
;;; Git
-(defvar magit-git-debug nil
- "Whether to enable additional reporting of git errors.
+(defvar magit-git-debug nil)
+
+(defun magit-toggle-git-debug ()
+ "Toggle whether additional git errors are reported.
Magit basically calls git for one of these two reasons: for
side-effects or to do something with its standard output.
When git is run for side-effects then its output, including error
-messages, go into the process buffer which is shown when using \
-\\<magit-status-mode-map>\\[magit-process-buffer].
+messages, go into the process buffer which is shown when using ~$~.
When git's output is consumed in some way, then it would be too
-expensive to also insert it into this buffer, but when this
-option is non-nil and git returns with a non-zero exit status,
-then at least its standard error is inserted into this buffer.
-
-This is only intended for debugging purposes. Do not enable this
-permanently, that would negatively affect performance. Also note
-that just because git exits with a non-zero exit status and prints
-an error message that usually doesn't mean that it is an error as
-far as Magit is concerned, which is another reason we usually hide
-these error messages. Whether some error message is relevant in
-the context of some unexpected behavior has to be judged on a case
-by case basis.
+expensive to also insert it into this buffer, but with this command
+that can be enabled temporarily. In that case, if git returns with
+a non-zero exit status, then at least its standard error is inserted
+into this buffer.
-The command `magit-toggle-git-debug' changes the value of this
-variable.
-
-Also see `magit-process-extreme-logging'.")
-
-(defun magit-toggle-git-debug ()
- "Toggle whether additional git errors are reported.
See info node `(magit)Debugging Tools' for more information."
(interactive)
(setq magit-git-debug (not magit-git-debug))