Skip to content

Commit

Permalink
Merge branch 'ds/doc-wholesale-disabling-advice-messages' into seen
Browse files Browse the repository at this point in the history
* ds/doc-wholesale-disabling-advice-messages:
  advice: recommend GIT_ADVICE=0 for tools
  • Loading branch information
gitster committed Sep 5, 2024
2 parents df906f4 + ac36d77 commit 436747c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Documentation/config/advice.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
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`:
aid new users. These are output to `stderr` by default as they are
intended to help human readers. Tools that execute Git as a subprocess
can disable these messages by setting `GIT_ADVICE=0` in the environment.
+
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`:
+
--
addEmbeddedRepo::
Expand Down
11 changes: 11 additions & 0 deletions Documentation/git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
------------------------

Expand Down

0 comments on commit 436747c

Please sign in to comment.