diff options
| author | James Liu <james@jamesliu.io> | 2024-05-03 17:17:06 +1000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-03 10:36:59 -0700 |
| commit | b79deeb55444f9e01a3f6335d7e0507e23e90190 (patch) | |
| tree | 44ece5c77a73a7c18a5c5c4939f481b172e44901 /Documentation/git.txt | |
| parent | 5bd8811a734536186dd69ae767a9d58ce01ad7cb (diff) | |
| download | git-b79deeb55444f9e01a3f6335d7e0507e23e90190.tar.xz | |
advice: add --no-advice global option
Advice hints must be disabled individually by setting the relevant
advice.* variables to false in the Git configuration. For server-side
and scripted usages of Git where hints can be a hindrance, it can be
cumbersome to maintain configuration to ensure all advice hints are
disabled in perpetuity. This is a particular concern in tests, where
new or changed hints can result in failed assertions.
Add a --no-advice global option to disable all advice hints from being
displayed. This is independent of the toggles for individual advice
hints. Use an internal environment variable (GIT_ADVICE) to ensure this
configuration is propagated to the usage site, even if it executes in a
subprocess.
Signed-off-by: James Liu <james@jamesliu.io>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git.txt')
| -rw-r--r-- | Documentation/git.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/git.txt b/Documentation/git.txt index d11d3d0c86..a0c07f1db8 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -12,8 +12,9 @@ SYNOPSIS 'git' [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--no-lazy-fetch] - [--no-optional-locks] [--bare] [--git-dir=<path>] [--work-tree=<path>] - [--namespace=<name>] [--config-env=<name>=<envvar>] <command> [<args>] + [--no-optional-locks] [--no-advice] [--bare] [--git-dir=<path>] + [--work-tree=<path>] [--namespace=<name>] [--config-env=<name>=<envvar>] + <command> [<args>] DESCRIPTION ----------- @@ -190,6 +191,9 @@ If you just want to run git as if it was started in `<path>` then use Do not perform optional operations that require locks. This is equivalent to setting the `GIT_OPTIONAL_LOCKS` to `0`. +--no-advice:: + Disable all advice hints from being printed. + --literal-pathspecs:: Treat pathspecs literally (i.e. no globbing, no pathspec magic). This is equivalent to setting the `GIT_LITERAL_PATHSPECS` environment |
