aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-09-13 15:27:43 -0700
committerJunio C Hamano <gitster@pobox.com>2024-09-13 15:27:43 -0700
commit19de221f3638517b7c1411b478cb7eb77db09ce1 (patch)
tree7e91d9f42512dcfe5234cb80e07cc1906db9ea73
parent17ae0b824911640dcccda9ff2f3a312ebe9dbacb (diff)
parentfb2b9815a4b5ea04a5f08940f546c6d5ef5e2414 (diff)
downloadgit-19de221f3638517b7c1411b478cb7eb77db09ce1.tar.gz
Merge branch 'ds/doc-wholesale-disabling-advice-messages'
The environment GIT_ADVICE has been intentionally kept undocumented to discourage its use by interactive users. Add documentation to help tool writers. * ds/doc-wholesale-disabling-advice-messages: advice: recommend GIT_ADVICE=0 for tools
-rw-r--r--Documentation/config/advice.txt8
-rw-r--r--Documentation/git.txt11
2 files changed, 18 insertions, 1 deletions
diff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt
index 0ba8989820..257db58918 100644
--- a/Documentation/config/advice.txt
+++ b/Documentation/config/advice.txt
@@ -2,7 +2,13 @@ advice.*::
These variables control various optional help messages designed to
aid new users. When left unconfigured, Git will give the message
alongside instructions on how to squelch it. You can tell Git
- that you do not need the help message by setting these to `false`:
+ that you have understood the issue and no longer need a specific
+ help message by setting the corresponding variable to `false`.
++
+As they are intended to help human users, these messages are output to
+the standard error. When tools that run Git as a subprocess find them
+disruptive, they can set `GIT_ADVICE=0` in the environment to squelch
+all advice messages.
+
--
addEmbeddedRepo::
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 4489e2297a..d15a869762 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -1027,6 +1027,17 @@ standard output.
adequate and support for it is likely to be removed in the
foreseeable future (along with the variable).
+`GIT_ADVICE`::
+ If set to `0`, then disable all advice messages. These messages are
+ intended to provide hints to human users that may help them get out of
+ problematic situations or take advantage of new features. Users can
+ disable individual messages using the `advice.*` config keys. These
+ messages may be disruptive to tools that execute Git processes, so this
+ variable is available to disable the messages. (The `--no-advice`
+ global option is also available, but old Git versions may fail when
+ this option is not understood. The environment variable will be ignored
+ by Git versions that do not understand it.)
+
Discussion[[Discussion]]
------------------------