Skip to content

Commit 2f7767e

Browse files
authored
docs: add trace2 to config/env documentation (#1230)
Add Trace2 config/env var options to GCM's configuration/environment documentation to improve discoverability.
2 parents 179f3db + 9060614 commit 2f7767e

File tree

2 files changed

+168
-0
lines changed

2 files changed

+168
-0
lines changed

docs/configuration.md

+75
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,75 @@ git config --global credential.azreposCredentialType oauth
741741

742742
**Also see: [GCM_AZREPOS_CREDENTIALTYPE][gcm-azrepos-credentialtype]**
743743

744+
---
745+
746+
### trace2.normalTarget
747+
748+
Turns on Trace2 Normal Format tracing - see [Git's Trace2 Normal Format
749+
documentation][trace2-normal-docs] for more details.
750+
751+
#### Example
752+
753+
```shell
754+
git config --global trace2.normalTarget true
755+
```
756+
757+
If the value of `trace2.normalTarget` is a full path to a file in an existing
758+
directory, logs are appended to the file.
759+
760+
If the value of `trace2.normalTarget` is `true` or `1`, logs are written to
761+
standard error.
762+
763+
Defaults to disabled.
764+
765+
**Also see: [GIT_TRACE2][trace2-normal-env]**
766+
767+
---
768+
769+
### trace2.eventTarget
770+
771+
Turns on Trace2 Event Format tracing - see [Git's Trace2 Event Format
772+
documentation][trace2-event-docs] for more details.
773+
774+
#### Example
775+
776+
```shell
777+
git config --global trace2.eventTarget true
778+
```
779+
780+
If the value of `trace2.eventTarget` is a full path to a file in an existing
781+
directory, logs are appended to the file.
782+
783+
If the value of `trace2.eventTarget` is `true` or `1`, logs are written to
784+
standard error.
785+
786+
Defaults to disabled.
787+
788+
**Also see: [GIT_TRACE2_EVENT][trace2-event-env]**
789+
790+
---
791+
792+
### trace2.perfTarget
793+
794+
Turns on Trace2 Performance Format tracing - see [Git's Trace2 Performance
795+
Format documentation][trace2-performance-docs] for more details.
796+
797+
#### Example
798+
799+
```shell
800+
git config --global trace2.perfTarget true
801+
```
802+
803+
If the value of `trace2.perfTarget` is a full path to a file in an existing
804+
directory, logs are appended to the file.
805+
806+
If the value of `trace2.perfTarget` is `true` or `1`, logs are written to
807+
standard error.
808+
809+
Defaults to disabled.
810+
811+
**Also see: [GIT_TRACE2_PERF][trace2-performance-env]**
812+
744813
[auto-detection]: autodetect.md
745814
[azure-tokens]: azrepos-users-and-tokens.md
746815
[use-http-path]: https://git-scm.com/docs/gitcredentials/#Documentation/gitcredentials.txt-useHttpPath
@@ -785,4 +854,10 @@ git config --global credential.azreposCredentialType oauth
785854
[provider-migrate]: migration.md#gcm_authority
786855
[cache-options]: https://git-scm.com/docs/git-credential-cache#_options
787856
[pass]: https://www.passwordstore.org/
857+
[trace2-normal-docs]: https://git-scm.com/docs/api-trace2#_the_normal_format_target
858+
[trace2-normal-env]: environment.md#GIT_TRACE2
859+
[trace2-event-docs]: https://git-scm.com/docs/api-trace2#_the_event_format_target
860+
[trace2-event-env]: environment.md#GIT_TRACE2_EVENT
861+
[trace2-performance-docs]: https://git-scm.com/docs/api-trace2#_the_performance_format_target
862+
[trace2-performance-env]: environment.md#GIT_TRACE2_PERF
788863
[wam]: windows-broker.md

docs/environment.md

+93
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,93 @@ export GCM_AZREPOS_CREDENTIALTYPE="oauth"
830830

831831
**Also see: [credential.azreposCredentialType][credential-azrepos-credential-type]**
832832

833+
---
834+
835+
### GIT_TRACE2
836+
837+
Turns on Trace2 Normal Format tracing - see [Git's Trace2 Normal Format
838+
documentation][trace2-normal-docs] for more details.
839+
840+
#### Windows
841+
842+
```batch
843+
SET GIT_TRACE2=%UserProfile%\log.normal
844+
```
845+
846+
#### macOS/Linux
847+
848+
```bash
849+
export GIT_TRACE2=~/log.normal
850+
```
851+
852+
If the value of `GIT_TRACE2` is a full path to a file in an existing directory,
853+
logs are appended to the file.
854+
855+
If the value of `GIT_TRACE2` is `true` or `1`, logs are written to standard
856+
error.
857+
858+
Defaults to disabled.
859+
860+
**Also see: [trace2.normalFormat][trace2-normal-config]**
861+
862+
---
863+
864+
### GIT_TRACE2_EVENT
865+
866+
Turns on Trace2 Event Format tracing - see [Git's Trace2 Event Format
867+
documentation][trace2-event-docs] for more details.
868+
869+
#### Windows
870+
871+
```batch
872+
SET GIT_TRACE2_EVENT=%UserProfile%\log.event
873+
```
874+
875+
#### macOS/Linux
876+
877+
```bash
878+
export GIT_TRACE2_EVENT=~/log.event
879+
```
880+
881+
If the value of `GIT_TRACE2_EVENT` is a full path to a file in an existing
882+
directory, logs are appended to the file.
883+
884+
If the value of `GIT_TRACE2_EVENT` is `true` or `1`, logs are written to
885+
standard error.
886+
887+
Defaults to disabled.
888+
889+
**Also see: [trace2.eventFormat][trace2-event-config]**
890+
891+
---
892+
893+
### GIT_TRACE2_PERF
894+
895+
Turns on Trace2 Performance Format tracing - see [Git's Trace2 Performance
896+
Format documentation][trace2-performance-docs] for more details.
897+
898+
#### Windows
899+
900+
```batch
901+
SET GIT_TRACE2_PERF=%UserProfile%\log.perf
902+
```
903+
904+
#### macOS/Linux
905+
906+
```bash
907+
export GIT_TRACE2_PERF=~/log.perf
908+
```
909+
910+
If the value of `GIT_TRACE2_PERF` is a full path to a file in an existing
911+
directory, logs are appended to the file.
912+
913+
If the value of `GIT_TRACE2_PERF` is `true` or `1`, logs are written to
914+
standard error.
915+
916+
Defaults to disabled.
917+
918+
**Also see: [trace2.perfFormat][trace2-performance-config]**
919+
833920
[autodetect]: autodetect.md
834921
[azure-access-tokens]: azrepos-users-and-tokens.md
835922
[configuration]: configuration.md
@@ -871,4 +958,10 @@ export GCM_AZREPOS_CREDENTIALTYPE="oauth"
871958
[libsecret]: https://wiki.gnome.org/Projects/Libsecret
872959
[migration-guide]: migration.md#gcm_authority
873960
[passwordstore]: https://www.passwordstore.org/
961+
[trace2-normal-docs]: https://git-scm.com/docs/api-trace2#_the_normal_format_target
962+
[trace2-normal-config]: configuration.md#trace2normalTarget
963+
[trace2-event-docs]: https://git-scm.com/docs/api-trace2#_the_event_format_target
964+
[trace2-event-config]: configuration.md#trace2eventTarget
965+
[trace2-performance-docs]: https://git-scm.com/docs/api-trace2#_the_performance_format_target
966+
[trace2-performance-config]: configuration.md#trace2perfTarget
874967
[windows-broker]: windows-broker.md

0 commit comments

Comments
 (0)