Add Git configuration options for trace & debug#1228
Conversation
ldennington
left a comment
There was a problem hiding this comment.
Looks good! Just a few nitpicky suggestions - the only main concern is the 404s on the links, but I suspect that's just an issue with GitHub's PR Files view.
|
|
||
| Defaults to tracing disabled. | ||
|
|
||
| **Also see: [GCM_TRACE][gcm-trace]** |
There was a problem hiding this comment.
Links are resulting in 404s. Will be resolved once merged?
There was a problem hiding this comment.
Hmm.. they are correct.. so I assume some issue with the PR view.
| TryGetSetting(KnownEnvars.GcmTrace, | ||
| KnownGitCfg.Credential.SectionName, | ||
| KnownGitCfg.Credential.Trace, | ||
| out value) && !value.IsFalsey(); |
There was a problem hiding this comment.
Maybe make this IsTruthy() to align with the IsDebuggingEnabled check above and the IsSecretTracingEnabled/IsMsalTracingEnabled checks below.
There was a problem hiding this comment.
We need to keep this to !IsFalsey because we can set this variable to something like a file path which is considered "enabled".
| Value | TryGetSetting |
IsTruthy |
IsFalsey |
TryGetSetting && !IsFalsey |
|---|---|---|---|---|
null |
❌ | ❌ | ❌ | ❌ |
"/tmp/file.txt" |
✅ | ❌ | ❌ | ✅ |
true/1/"yes"/"on" |
✅ | ✅ | ❌ | ✅ |
false/0/"no"/"off" |
✅ | ❌ | ✅ | ❌ |
There was a problem hiding this comment.
Lovely truth table - explains very nicely, thank you!
Add options for enabling tracing and debugging in Git configuration. Today the below options were only supported via environment variable: - GCM_TRACE - GCM_TRACE_SECRETS - GCM_TRACE_MSAUTH - GCM_DEBUG
23fa49e to
50837bf
Compare
**Changes:** - Support ports in URL-scoped config (#825) - Support URL-scoped enterprise default settings (#1149) - Add support for client TLS certificates (#1152) - Add TRACE2 support(#1131, #1151, #1156, #1162) - Better browser detection inside of WSL (#1148) - Handle expired OAuth refresh token for generic auth (#1196) - Target *-latest runner images in CI workflow (#1178) - Various bug fixes: - Ensure we create a WindowsProcessManager on Windows (#1146) - Ensure we start child processes created with ProcessManager (#1177) - Fix app path name of Windows dropping file extension (#1181) - Ensure we init IEnvironment before SessionManager (#1167) - git: consistently read from stdout before exit wait (#1136) - trace2: guard against null pipe client in dispose (#1135) - Make Avalonia UI the default Windows and move to in-process (#1207) - Add Git configuration options for trace & debug (#1228) - Transition from Nerdbank.GitVersioning to a version file (#1231) - Add support for using the current Windows user for WAM on DevBox (#1197) - Various documentation updates: - org-rename: update references to GitCredentialManager (#1141) - issue templates: remove core suffix (#1180) - readme: add link to project roadmap (#1204) - docs: add bitbucket app password requirements (#1213) - .net tool: clarify install instructions (#1126) - docs: call out different GCM install paths in WSL docs (#1168) - docs: add trace2 to config/env documentation (#1230)
Add options for enabling tracing and debugging in Git configuration. Today the below options were only supported via environment variable:
GCM_TRACEGCM_TRACE_SECRETSGCM_TRACE_MSAUTHGCM_DEBUG