-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Git configuration options for trace & debug #1228
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -475,7 +475,11 @@ protected virtual bool TryGetExternalDefault(string section, string scope, strin | ||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
public Uri RemoteUri { get; set; } | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
public bool IsDebuggingEnabled => _environment.Variables.GetBooleanyOrDefault(KnownEnvars.GcmDebug, false); | |||||||||||||||||||||||||||
public bool IsDebuggingEnabled => | |||||||||||||||||||||||||||
TryGetSetting(KnownEnvars.GcmDebug, | |||||||||||||||||||||||||||
KnownGitCfg.Credential.SectionName, | |||||||||||||||||||||||||||
KnownGitCfg.Credential.Debug, | |||||||||||||||||||||||||||
out string str) && str.IsTruthy(); | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
public bool IsTerminalPromptsEnabled => _environment.Variables.GetBooleanyOrDefault(KnownEnvars.GitTerminalPrompts, true); | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
|
@@ -536,7 +540,11 @@ public bool IsInteractionAllowed | ||||||||||||||||||||||||||
} | |||||||||||||||||||||||||||
} | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
public bool GetTracingEnabled(out string value) => _environment.Variables.TryGetValue(KnownEnvars.GcmTrace, out value) && !value.IsFalsey(); | |||||||||||||||||||||||||||
public bool GetTracingEnabled(out string value) => | |||||||||||||||||||||||||||
TryGetSetting(KnownEnvars.GcmTrace, | |||||||||||||||||||||||||||
KnownGitCfg.Credential.SectionName, | |||||||||||||||||||||||||||
KnownGitCfg.Credential.Trace, | |||||||||||||||||||||||||||
out value) && !value.IsFalsey(); | |||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe make this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to keep this to
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lovely truth table - explains very nicely, thank you! |
|||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
public Trace2Settings GetTrace2Settings() | |||||||||||||||||||||||||||
{ | |||||||||||||||||||||||||||
|
@@ -563,9 +571,17 @@ public Trace2Settings GetTrace2Settings() | ||||||||||||||||||||||||||
return settings; | |||||||||||||||||||||||||||
} | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
public bool IsSecretTracingEnabled => _environment.Variables.GetBooleanyOrDefault(KnownEnvars.GcmTraceSecrets, false); | |||||||||||||||||||||||||||
public bool IsSecretTracingEnabled => | |||||||||||||||||||||||||||
TryGetSetting(KnownEnvars.GcmTraceSecrets, | |||||||||||||||||||||||||||
KnownGitCfg.Credential.SectionName, | |||||||||||||||||||||||||||
KnownGitCfg.Credential.TraceSecrets, | |||||||||||||||||||||||||||
out string str) && str.IsTruthy(); | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
public bool IsMsalTracingEnabled => _environment.Variables.GetBooleanyOrDefault(Constants.EnvironmentVariables.GcmTraceMsAuth, false); | |||||||||||||||||||||||||||
public bool IsMsalTracingEnabled => | |||||||||||||||||||||||||||
TryGetSetting(KnownEnvars.GcmTraceMsAuth, | |||||||||||||||||||||||||||
KnownGitCfg.Credential.SectionName, | |||||||||||||||||||||||||||
KnownGitCfg.Credential.TraceMsAuth, | |||||||||||||||||||||||||||
out string str) && str.IsTruthy(); | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
public string ProviderOverride => | |||||||||||||||||||||||||||
TryGetSetting(KnownEnvars.GcmProvider, GitCredCfg.SectionName, GitCredCfg.Provider, out string providerId) ? providerId : null; | |||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Links are resulting in 404s. Will be resolved once merged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. they are correct.. so I assume some issue with the PR view.