Skip to content

Commit 8dfd884

Browse files
committed
docs: add trace2 to config/env documentation
Add Trace2 config/env var options to GCM's configuration/environment documentation to improve discoverability.
1 parent d6a4cf3 commit 8dfd884

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
@@ -661,6 +661,75 @@ git config --global credential.azreposCredentialType oauth
661661

662662
**Also see: [GCM_AZREPOS_CREDENTIALTYPE][gcm-azrepos-credentialtype]**
663663

664+
---
665+
666+
### trace2.normalTarget
667+
668+
Turns on Trace2 Normal Format tracing - see [Git's Trace2 Normal Format
669+
documentation][trace2-normal-docs] for more details.
670+
671+
#### Example
672+
673+
```shell
674+
git config --global trace2.normalTarget ~/log.normal
675+
```
676+
677+
If the value of `trace2.normalTarget` is a full path to a file in an existing
678+
directory, logs are appended to the file.
679+
680+
If the value of `trace2.normalTarget` is `true` or `1`, logs are written to
681+
standard error.
682+
683+
Defaults to disabled.
684+
685+
**Also see: [GIT_TRACE2][trace2-normal-env]**
686+
687+
---
688+
689+
### trace2.eventTarget
690+
691+
Turns on Trace2 Event Format tracing - see [Git's Trace2 Event Format
692+
documentation][trace2-event-docs] for more details.
693+
694+
#### Example
695+
696+
```shell
697+
git config --global trace2.eventTarget ~/log.event
698+
```
699+
700+
If the value of `trace2.eventTarget` is a full path to a file in an existing
701+
directory, logs are appended to the file.
702+
703+
If the value of `trace2.eventTarget` is `true` or `1`, logs are written to
704+
standard error.
705+
706+
Defaults to disabled.
707+
708+
**Also see: [GIT_TRACE2_EVENT][trace2-event-env]**
709+
710+
---
711+
712+
### trace2.perfTarget
713+
714+
Turns on Trace2 Performance Format tracing - see [Git's Trace2 Performance
715+
Format documentation][trace2-performance-docs] for more details.
716+
717+
#### Example
718+
719+
```shell
720+
git config --global trace2.perfTarget ~/log.perf
721+
```
722+
723+
If the value of `trace2.perfTarget` is a full path to a file in an existing
724+
directory, logs are appended to the file.
725+
726+
If the value of `trace2.perfTarget` is `true` or `1`, logs are written to
727+
standard error.
728+
729+
Defaults to disabled.
730+
731+
**Also see: [GIT_TRACE2_PERF][trace2-performance-env]**
732+
664733
[auto-detection]: autodetect.md
665734
[azure-tokens]: azrepos-users-and-tokens.md
666735
[use-http-path]: https://git-scm.com/docs/gitcredentials/#Documentation/gitcredentials.txt-useHttpPath
@@ -701,4 +770,10 @@ git config --global credential.azreposCredentialType oauth
701770
[provider-migrate]: migration.md#gcm_authority
702771
[cache-options]: https://git-scm.com/docs/git-credential-cache#_options
703772
[pass]: https://www.passwordstore.org/
773+
[trace2-normal-docs]: https://git-scm.com/docs/api-trace2#_the_normal_format_target
774+
[trace2-normal-env]: environment.md#GIT_TRACE2
775+
[trace2-event-docs]: https://git-scm.com/docs/api-trace2#_the_event_format_target
776+
[trace2-event-env]: environment.md#GIT_TRACE2_EVENT
777+
[trace2-performance-docs]: https://git-scm.com/docs/api-trace2#_the_performance_format_target
778+
[trace2-performance-env]: environment.md#GIT_TRACE2_PERF
704779
[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-event-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
@@ -867,4 +954,10 @@ export GCM_AZREPOS_CREDENTIALTYPE="oauth"
867954
[libsecret]: https://wiki.gnome.org/Projects/Libsecret
868955
[migration-guide]: migration.md#gcm_authority
869956
[passwordstore]: https://www.passwordstore.org/
957+
[trace2-normal-docs]: https://git-scm.com/docs/api-trace2#_the_normal_format_target
958+
[trace2-normal-config]: configuration.md#trace2normalTarget
959+
[trace2-event-docs]: https://git-scm.com/docs/api-trace2#_the_event_format_target
960+
[trace2-event-config]: configuration.md#trace2eventTarget
961+
[trace2-performance-docs]: https://git-scm.com/docs/api-trace2#_the_performance_format_target
962+
[trace2-performance-config]: configuration.md#trace2perfTarget
870963
[windows-broker]: windows-broker.md

0 commit comments

Comments
 (0)