提交 4e0d3aa1 编写于 作者: S SZEDER Gábor 提交者: Junio C Hamano

trace2: document the supported values of GIT_TRACE2* env variables

The descriptions of the GIT_TRACE2* environment variables link to the
technical docs for further details on the supported values.  However,
a link like this only really works if the docs are viewed in a browser
and the full documentation is available.  OTOH, in 'man git' there are
no links to conveniently click on, and distro-shipped git packages
tend to include only the man pages, while the technical docs and the
docs in html format are in a separate 'git-doc' package.

So let's describe the supported values to make the manpage more
self-contained, but still keep the references to the technical docs
because the details of the SID, and the JSON and perf output formats
are definitely beyond the scope of 'man git'.
Signed-off-by: NSZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 e4b75d6a
......@@ -665,21 +665,48 @@ of clones and fetches.
Output from `GIT_TRACE2` is a simple text-based format for human
readability.
+
The `GIT_TRACE2` variables can take many values. Any value available to
the `GIT_TRACE` variables is also available to `GIT_TRACE2`. The `GIT_TRACE2`
variables can also specify a Unix Domain Socket. See
link:technical/api-trace2.html[Trace2 documentation] for full details.
If this variable is set to "1", "2" or "true" (comparison
is case insensitive), trace messages will be printed to
stderr.
+
If the variable is set to an integer value greater than 2
and lower than 10 (strictly) then Git will interpret this
value as an open file descriptor and will try to write the
trace messages into this file descriptor.
+
Alternatively, if the variable is set to an absolute path
(starting with a '/' character), Git will interpret this
as a file path and will try to append the trace messages
to it. If the path already exists and is a directory, the
trace messages will be written to files (one per process)
in that directory, named according to the last component
of the SID and an optional counter (to avoid filename
collisions).
+
In addition, if the variable is set to
`af_unix:[<socket_type>:]<absolute-pathname>`, Git will try
to open the path as a Unix Domain Socket. The socket type
can be either `stream` or `dgram`.
+
Unsetting the variable, or setting it to empty, "0" or
"false" (case insensitive) disables trace messages.
+
See link:technical/api-trace2.html[Trace2 documentation]
for full details.
`GIT_TRACE2_EVENT`::
This setting writes a JSON-based format that is suited for machine
interpretation. See link:technical/api-trace2.html[Trace2 documentation]
for full details.
interpretation.
See `GIT_TRACE2` for available trace output options and
link:technical/api-trace2.html[Trace2 documentation] for full details.
`GIT_TRACE2_PERF`::
In addition to the text-based messages available in `GIT_TRACE2`, this
setting writes a column-based format for understanding nesting
regions. See link:technical/api-trace2.html[Trace2 documentation]
for full details.
regions.
See `GIT_TRACE2` for available trace output options and
link:technical/api-trace2.html[Trace2 documentation] for full details.
`GIT_REDACT_COOKIES`::
This can be set to a comma-separated list of strings. When a curl trace
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册