Repository navigation
trace2: improve lifecycle and instrumentation - #2408
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Moves Trace2 to a process-wide lifecycle and adds instrumentation across command, authentication, configuration, storage, process, and UI workflows.
Changes:
- Reworks Trace2 messages, writers, process correlation, and logical contexts.
- Removes injected Trace2 dependencies and centralizes exception reporting.
- Adds command, data, UI, authentication, and credential-store instrumentation.
Reviewed changes
Copilot reviewed 97 out of 99 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/TestInfrastructure/Objects/TestSettings.cs |
Removes injected Trace2 settings. |
src/TestInfrastructure/Objects/TestCommandContext.cs |
Removes context-owned Trace2. |
src/TestInfrastructure/Objects/NullTrace.cs |
Removes obsolete Trace2 stub. |
src/TestInfrastructure/GitTestUtilities.cs |
Updates child-process API usage. |
src/Microsoft.AzureRepos/AzureReposHostProvider.cs |
Removes tracing-specific exceptions. |
src/Microsoft.AzureRepos/AzureDevOpsRestApi.cs |
Uses standard exceptions. |
src/Microsoft.AzureRepos.Tests/AzureReposHostProviderTests.cs |
Updates exception assertions. |
src/Microsoft.AzureRepos.Tests/AzureDevOpsApiTests.cs |
Updates exception assertions. |
src/GitLab/UI/Commands/CredentialsCommand.cs |
Uses standard cancellation exception. |
src/GitLab/GitLabOAuth2Client.cs |
Removes Trace2 dependency. |
src/GitLab/GitLabHostProvider.cs |
Uses standard exceptions. |
src/GitLab/GitLabAuthentication.cs |
Removes injected tracing and specialized exceptions. |
src/GitLab.Tests/GitLabAuthenticationTests.cs |
Updates exception assertions. |
src/GitHub/UI/Commands/TwoFactorCommand.cs |
Uses standard cancellation exception. |
src/GitHub/UI/Commands/DeviceCommand.cs |
Uses standard cancellation exception. |
src/GitHub/UI/Commands/CredentialsCommand.cs |
Uses standard cancellation exception. |
src/GitHub/GitHubOAuth2Client.cs |
Removes Trace2 dependency. |
src/GitHub/GitHubHostProvider.cs |
Uses process-wide Trace2. |
src/GitHub/GitHubAuthentication.cs |
Adds authentication instrumentation. |
src/GitHub.Tests/GitHubHostProviderTests.cs |
Updates exception assertions. |
src/GitHub.Tests/GitHubAuthenticationTests.cs |
Updates exception assertions. |
src/git-credential-manager/Program.cs |
Owns Trace2 process lifecycle. |
src/Core/WslUtils.cs |
Updates WSL child-process creation. |
src/Core/UI/HelperApplication.cs |
Reports exceptions through Trace2. |
src/Core/UI/Commands/OAuthCommand.cs |
Uses standard cancellation exception. |
src/Core/UI/Commands/DeviceCodeCommand.cs |
Uses standard cancellation exception. |
src/Core/UI/Commands/DefaultAccountCommand.cs |
Uses standard cancellation exception. |
src/Core/UI/Commands/CredentialsCommand.cs |
Uses standard cancellation exception. |
src/Core/UI/AvaloniaUi.cs |
Instruments UI initialization and windows. |
src/Core/Tty/AnsiConsoleFactory.cs |
Instruments console creation. |
src/Core/Tracing/TraceUtils.cs |
Centralizes source formatting. |
src/Core/Tracing/Trace2Writer.cs |
Makes Trace2 writers abstract. |
src/Core/Tracing/Trace2TextWriter.cs |
Adds text-writer output. |
src/Core/Tracing/Trace2ProcessClass.cs |
Defines child-process classifications. |
src/Core/Tracing/Trace2PipeWriter.cs |
Refactors named-pipe output. |
src/Core/Tracing/Trace2Message.cs |
Defines Trace2 event messages and formats. |
src/Core/Tracing/Trace2FormatTarget.cs |
Defines output formats. |
src/Core/Tracing/Trace2FileWriter.cs |
Simplifies file output. |
src/Core/Tracing/Trace2.cs |
Implements process-wide Trace2. |
src/Core/Tracing/Trace.cs |
Relocates standard tracing. |
src/Core/Trace2StreamWriter.cs |
Removes obsolete stream writer. |
src/Core/Trace2Message.cs |
Removes previous message implementation. |
src/Core/Trace2Exception.cs |
Removes tracing-specific exceptions. |
src/Core/Trace2.cs |
Removes context-owned Trace2. |
src/Core/Settings.cs |
Removes Trace2 settings ownership. |
src/Core/ProcessManager.cs |
Moves process classification to creation. |
src/Core/PlatformUtils.cs |
Removes Trace2 parameters. |
src/Core/Interop/Windows/WindowsProcessManager.cs |
Updates Windows process creation. |
src/Core/Interop/Windows/Native/Win32Error.cs |
Removes tracing-specific interop errors. |
src/Core/HttpClientFactory.cs |
Uses global Trace2 reporting. |
src/Core/HostProviderRegistry.cs |
Uses global Trace2 reporting. |
src/Core/Gpg.cs |
Updates process tracing and exceptions. |
src/Core/GitConfiguration.cs |
Instruments configuration operations. |
src/Core/Git.cs |
Updates Git process tracing. |
src/Core/GenericHostProvider.cs |
Removes Trace2 injection. |
src/Core/Diagnostics/GitDiagnostic.cs |
Updates child-process API usage. |
src/Core/Diagnostics/EnvironmentDiagnostic.cs |
Removes Trace2 parameter. |
src/Core/CredentialStore.cs |
Instruments credential-store operations. |
src/Core/Constants.cs |
Removes Trace2 user-agent dependency. |
src/Core/ConsoleService.cs |
Lazily creates consoles. |
src/Core/Commands/StoreCommand.cs |
Instruments provider storage. |
src/Core/Commands/GitCommandBase.cs |
Instruments command parsing and dispatch. |
src/Core/Commands/GetCommand.cs |
Instruments provider retrieval. |
src/Core/Commands/EraseCommand.cs |
Instruments provider erasure. |
src/Core/Commands/DiagnoseCommand.cs |
Instruments diagnostics. |
src/Core/Commands/ConfigurationCommands.cs |
Instruments configuration commands. |
src/Core/Commands/CapabilityCommand.cs |
Instruments capability command. |
src/Core/CommandContext.cs |
Removes context-owned Trace2. |
src/Core/ChildProcess.cs |
Adds stable Trace2 child IDs and timing. |
src/Core/Authentication/OAuthAuthentication.cs |
Uses standard exceptions. |
src/Core/Authentication/OAuth/OAuth2Client.cs |
Adds OAuth instrumentation. |
src/Core/Authentication/Entra/EntraAuthentication.PublicClient.cs |
Uses standard exceptions. |
src/Core/Authentication/Entra/EntraAuthentication.Caching.cs |
Uses global Trace2 reporting. |
src/Core/Authentication/BasicAuthentication.cs |
Uses standard exceptions. |
src/Core/Authentication/AuthenticationBase.cs |
Removes injected Trace2 usage. |
src/Core/Application.cs |
Instruments command setup and errors. |
src/Core.Tests/WslUtilsTests.cs |
Updates WSL process tests. |
src/Core.Tests/Trace2Tests.cs |
Adds SID and depth tests. |
src/Core.Tests/Trace2MessageTests.cs |
Tests new Trace2 event formats. |
src/Core.Tests/TestProcessManager.cs |
Updates process manager test double. |
src/Core.Tests/ProcessManagerTests.cs |
Removes obsolete SID tests. |
src/Core.Tests/HttpClientFactoryTests.cs |
Updates factory construction. |
src/Core.Tests/HostProviderRegistryTests.cs |
Updates exception assertions. |
src/Core.Tests/GitTests.cs |
Updates Git construction. |
src/Core.Tests/GitConfigurationTests.cs |
Updates Git construction. |
src/Core.Tests/ConsoleServiceTests.cs |
Tests lazy console factories. |
src/Core.Tests/Authentication/OAuth2ClientTests.cs |
Removes Trace2 test dependency. |
src/Core.Tests/Authentication/Entra/EntraAuthenticationTests.cs |
Updates exception assertions. |
src/Core.Tests/Authentication/BasicAuthenticationTests.cs |
Updates exception assertions. |
src/Atlassian.Bitbucket/UI/Commands/CredentialsCommand.cs |
Uses standard cancellation exception. |
src/Atlassian.Bitbucket/OAuth2ClientRegistry.cs |
Removes Trace2 client injection. |
src/Atlassian.Bitbucket/DataCenter/BitbucketOAuth2Client.cs |
Removes Trace2 dependency. |
src/Atlassian.Bitbucket/Cloud/BitbucketOAuth2Client.cs |
Removes Trace2 dependency. |
src/Atlassian.Bitbucket/BitbucketOAuth2Client.cs |
Updates base OAuth construction. |
src/Atlassian.Bitbucket/BitbucketHostProvider.cs |
Uses global Trace2 reporting. |
src/Atlassian.Bitbucket/BitbucketAuthentication.cs |
Adds authentication instrumentation. |
src/Atlassian.Bitbucket.Tests/DataCenter/BitbucketOAuth2ClientTest.cs |
Updates client construction. |
src/Atlassian.Bitbucket.Tests/Cloud/BitbucketOAuth2ClientTest.cs |
Updates client construction and assertions. |
docs/development.md |
Documents added Trace2 events. |
Suppressed comments (1)
src/Core.Tests/Trace2Tests.cs:90
- This
catchconverts every assertion failure into a passing test and fails to restore the process environment on success. Change it tofinallyso cleanup is unconditional without suppressing failures.
catch
{
// Restore original environment variable for this process
Environment.SetEnvironmentVariable(Trace2.SidEnvar, originalSid);
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
mjcheetham
force-pushed
the
trace2-v3
branch
3 times, most recently
from
September 15, 2026 13:28
bae90d3 to
ede3866
Compare
Gather tracing implementation files under a dedicated directory so the subsequent behavioral changes are easier to review. Rename writer source files at the same time and align the public region-scope API with its lifetime by naming the operation StartRegion. Folding that terminology into the source reorganization gives every later change the final scope vocabulary instead of preserving a transitional API name that would need a standalone cleanup. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Consolidate event serialization and normal/performance formatting so each message declares only its event-specific data. Extract the shared format and process classifications, and align writer implementations with their source names to make later lifecycle changes smaller and clearer. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
TRACE2 represents one process-wide event stream, so an injected instance obscures its lifetime and makes region state appear isolatable when it is not. Make event emission and writer state static first so the API shape can be reviewed apart from startup ownership and the downstream constructor migration. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Tracing begins before CommandContext exists and survives until dispatcher shutdown, so injected services create a circular dependency for process identity and settings. Let Trace2 establish its SID, depth, targets, and initial events at entry, then close writers after dispatch ends. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
CommandContext should expose replaceable execution services, not own a process-wide event stream. Removing TRACE2 from that surface makes the remaining injected dependencies explicit and avoids preserving a fake test tracer for state that can no longer vary by context. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Core infrastructure cannot meaningfully substitute a process-wide tracer, yet carrying it through process, Git, HTTP, and platform constructors forces every helper to mirror global lifetime. Remove that dependency from the service layer and emit its existing events through the static API, while leaving leaf exception conversion for the final pass. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
OAuth clients only forward the tracer so every provider can emit into the same process stream. That parameter creates a constructor cascade without representing per-client state. Remove it at the OAuth boundary so provider wiring follows the real ownership model, while reserving leaf exception changes for the final cleanup. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
After constructor ownership is gone, leaf exception wrappers and command call sites still refer to a tracer that cannot vary by caller. Route those final authentication, provider, storage, UI, and Win32 events through the process API so the migration becomes buildable again without introducing an adapter that would immediately disappear. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Exception subclasses that emit while being constructed can report failures more than once and make ordinary error handling depend on tracing. Emit once at the application boundary, preserve the richer Git and interop formats there, and return call sites to standard exception types. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Child start and exit events need a stable correlation identity and timing that survives fast process termination. Give each child wrapper its own Trace2 identifier, classify it when it is created, and report the operating system exit timestamp from the process notification. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Physical managed threads do not describe asynchronous work once execution crosses awaits or dispatcher boundaries. Flow an explicit Trace2 context with the execution context so thread identities, nested regions, and relative timing remain coherent, while allowing callers to restore the main context when needed. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Repeated fully qualified caller-info attribute names obscure the Trace2 API signatures. Import the namespace to keep those signatures readable without changing behavior. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
A process start records argv but does not identify which command parser branch ultimately won. Emit the canonical command name after parsing and carry an inherited hierarchy through child processes so nested helper activity can be related to its originating command. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Regions describe elapsed work but cannot explain the values that shaped that work. Add scalar and structured data events whose thread, nesting, and relative timing come from the active logical context, allowing later instrumentation to attach useful measurements without inventing new regions. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Top-level traces currently stop before command parsing and provider selection, leaving the most important dispatch decisions invisible. Add focused regions and metadata around setup, input parsing, provider resolution, and each command entry point so command execution can be followed end to end. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Command dispatch alone cannot explain time spent discovering Git, reading configuration, or opening the selected credential store. Trace those service boundaries and record the configuration scope and backing-store choices that drive their behavior. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Eager console creation and dispatcher hand-offs hide UI startup cost and can initialize terminal state before it is needed. Create consoles lazily and trace ANSI, Avalonia, rendering, and window-display boundaries so interactive latency is attributed to the correct lifecycle stage. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Authentication spans browser, device-code, refresh, account selection, and provider-specific decisions that are otherwise indistinguishable in a trace. Add regions and mode data at those boundaries so delays and user-flow choices can be diagnosed without recording credentials. Assisted-by: GPT-5.6 Sol Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
mjcheetham
force-pushed
the
trace2-v3
branch
from
September 15, 2026 13:32
ede3866 to
f8625ae
Compare
dscho
reviewed
Sep 15, 2026
dscho
left a comment
Contributor
There was a problem hiding this comment.
Oh my, what a big PR!
But it's worth it. I'm particularly excited about proper tracing of async call paths, and especially about a much more complete Trace2 coverage!
dscho
approved these changes
Sep 15, 2026
dscho
left a comment
Contributor
There was a problem hiding this comment.
Oops, I meant to approve the PR 😊
tak848
pushed a commit
to tak848/dotfiles
that referenced
this pull request
Oct 12, 2026
…nager to v3 (#981) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github:git-ecosystem/git-credential-manager](https://redirect.github.com/git-ecosystem/git-credential-manager) | tools | major | `v2.9.1` → `v3.0.1` | --- ### Release Notes <details> <summary>git-ecosystem/git-credential-manager (github:git-ecosystem/git-credential-manager)</summary> ### [`v3.0.1`](https://redirect.github.com/git-ecosystem/git-credential-manager/releases/tag/v3.0.1): GCM 3.0.1 [Compare Source](https://redirect.github.com/git-ecosystem/git-credential-manager/compare/v3.0.0...v3.0.1) Git Credential Manager 3.0 brings native ahead-of-time compilation, Microsoft authentication broker support across Windows, macOS, and Linux, and a refreshed terminal experience. ### Changes since 3.0.0 - **(Bug fix)** Prompt for default OS account on Microsoft DevBox ([#​2459](https://redirect.github.com/git-ecosystem/git-credential-manager/issues/2459)) - **(Bug fix)** Restore Entra broker parent window handling ([#​2464](https://redirect.github.com/git-ecosystem/git-credential-manager/issues/2464)) - **(Feature)** Support `authtype` Git capability ([#​2457](https://redirect.github.com/git-ecosystem/git-credential-manager/issues/2457)) - **(Feature)** Add console parent window parenting for non-Entra UI ([#​2465](https://redirect.github.com/git-ecosystem/git-credential-manager/issues/2465)) - Drop Windows x86 release binaries ([#​2456](https://redirect.github.com/git-ecosystem/git-credential-manager/issues/2456)) **Changelog:** [v3.0.0...v3.0.1][point1-changelog] ### Changes since 2.9.1 > \[!IMPORTANT] > This release changes supported operating systems and the default Azure Repos authentication experience. Review the breaking changes before upgrading. #### Breaking changes and upgrade notes ##### Updated platform and .NET requirements GCM now targets **.NET 10 on all platforms**. Windows builds no longer use .NET Framework. | Platform or installation method | Requirement | | ------------------------------- | --------------------------------------------------------- | | Windows | Windows 10 or later; Windows Server 2016 or later | | macOS | macOS 14 or later | | Linux | A distribution supported by .NET 10 | | .NET tool | Install the .NET 10 SDK before installing or updating GCM | See the [supported environments][supported-environments] and [.NET 10 support matrix][dotnet-support] for details. Standalone platform packages do **not** require a separate .NET installation. **Windows 7 and Windows 8.x are no longer supported by GCM 3.x.** GCM 2.9.x will receive minimal, security-only maintenance for those systems, but no new features. Upgrading Windows is recommended. ([git-ecosystem/git-credential-manager#2365][pr-2365], [git-ecosystem/git-credential-manager#2367][pr-2367]) ##### Azure Repos uses OAuth tokens by default GCM now returns Microsoft identity **OAuth tokens**, rather than creating personal access tokens (PATs), by default for Azure Repos. OAuth tokens are automatically refreshed as needed. Explicit credential-type settings are still respected. If you need the previous PAT behavior, set: ```shell git config --global credential.azreposCredentialType pat ``` The equivalent environment variable is `GCM_AZREPOS_CREDENTIALTYPE=pat`. See [Azure Repos users and tokens][azrepos-tokens]. ([git-ecosystem/git-credential-manager#2449][pr-2449]) ##### Microsoft authentication uses the OS broker by default Broker integration is now enabled by default wherever supported, rather than requiring an opt-in. This applies to Microsoft authentication, such as Azure Repos; it does not change authentication for GitHub, Bitbucket, or GitLab. On macOS, broker authentication requires Company Portal and device enrollment. On Linux, it requires the supported Intune setup, a GNOME desktop, and Microsoft Edge; headless and WSL environments do not support the Linux broker. > \[!WARNING] > Depending on your organization's policies, broker sign-in can prompt you to join or enroll your device. On Windows, signing in with a personal Microsoft account can also affect the account linked to your local Windows user. Review the [broker documentation][broker] before proceeding, especially on personal devices. To opt out: ```shell git config --global credential.msauthUseBroker false ``` The equivalent environment variable is `GCM_MSAUTH_USEBROKER=false`. When the broker is in use, it takes precedence over `credential.msauthFlow`. ([git-ecosystem/git-credential-manager#2449][pr-2449]) ##### Azure Repos uses a dedicated GCM Entra application GCM now signs in using its own first-party Microsoft Entra application instead of the Visual Studio application. This enables broker support on macOS and Linux, in addition to Windows. If you encounter a client-application configuration error, GCM provides guidance for retrying with the legacy application; it does **not** silently switch back. For a one-command compatibility retry: ```shell git -c credential.azreposUseLegacyClientId=true fetch ``` Please report the original failure if this workaround succeeds. The legacy application does not support broker authentication on macOS or Linux. Managed identity, service-principal, and workload-identity federation flows are unaffected by the application change. The undocumented developer overrides `credential.azreposDevClientId` and `credential.azreposDevAuthorityBaseUri`, and their environment-variable equivalents `GCM_DEV_AZREPOS_CLIENTID` and `GCM_DEV_AZREPOS_AUTHORITYBASEURI`, have been removed. The [legacy-client setting][legacy-client] is a focused compatibility option, not an arbitrary client-ID or authority override. ([git-ecosystem/git-credential-manager#2416][pr-2416]) ##### The embedded Microsoft sign-in web view has been removed The Windows-only embedded web view depended on .NET Framework and is no longer available. Use the broker, system browser, or device-code flow instead. If you previously forced `credential.msauthFlow=embedded` or `GCM_MSAUTH_FLOW=embedded`, change it to `auto`, `system`, or `devicecode`. Disable broker integration as described above if you specifically need to force a non-broker flow. ([git-ecosystem/git-credential-manager#2365][pr-2365]) ##### Terminal and diagnostic output has changed Terminal selection prompts now use arrow-key navigation instead of numbered input, and `diagnose` has a new output format. Automation that drives interactive menus or parses diagnostic text may need updating. Git's credential-protocol input and output remain separate from interactive prompts. ([git-ecosystem/git-credential-manager#2377][pr-2377], [git-ecosystem/git-credential-manager#2425][pr-2425]) #### Features and improvements - **Native ahead-of-time builds.** Published platform packages compile GCM to native code to reduce startup overhead. The .NET tool remains a framework-dependent distribution. ([git-ecosystem/git-credential-manager#2366][pr-2366], [git-ecosystem/git-credential-manager#2367][pr-2367]) - **Cross-platform Microsoft single sign-on.** The authentication broker can reuse OS accounts on supported Windows, macOS, and Linux installations. When a default OS account can be used, GCM asks for confirmation unless automatic use is explicitly enabled, or enabled by default in environments such as Microsoft Dev Box. Set `credential.msauthUseDefaultAccount=false` to skip the default-account attempt. See the [broker documentation][broker]. ([git-ecosystem/git-credential-manager#2379][pr-2379], [git-ecosystem/git-credential-manager#2416][pr-2416]) - **Optional isolated Azure Repos token cache.** Set `credential.azreposUseMicrosoftSharedCache=false`, or `GCM_AZREPOS_USE_MSFT_CACHE=false`, to use a GCM-specific cache. Sharing with other Microsoft developer tools remains the default. ([git-ecosystem/git-credential-manager#2415][pr-2415]) - **Support for Bitbucket Cloud's updated OAuth tokens.** Rotating refresh tokens are now consistently saved against the resolved Bitbucket username, avoiding repeated sign-ins caused by reusing an old refresh token. Large access and refresh tokens are split across credential entries when needed, so Windows users can keep the default `wincredman` store without switching to another credential store. ([git-ecosystem/git-credential-manager#2433][pr-2433], [git-ecosystem/git-credential-manager#2440][pr-2440]) - **Generic OAuth beyond HTTP(S).** Generic OAuth configuration now works for non-HTTP credential requests, such as SMTP authentication for `git send-email`. Windows Integrated Authentication remains HTTP(S)-only. ([git-ecosystem/git-credential-manager#2445][pr-2445]) - **Refreshed terminal prompts and diagnostics.** Interactive prompts use Spectre.Console, and Ctrl+C during a prompt restores the terminal and exits cleanly with status 130. `git-credential-manager diagnose` distinguishes passed, warning, failed, and skipped checks, reports the actual credential store, and summarizes generated logs. Add `--strict` to return a non-zero exit code for warnings as well as errors; without it, only errors fail. ([git-ecosystem/git-credential-manager#2377][pr-2377], [git-ecosystem/git-credential-manager#2423][pr-2423], [git-ecosystem/git-credential-manager#2425][pr-2425]) - **More complete Trace2 diagnostics.** Expanded instrumentation covers command execution, configuration, credential storage, UI startup, and authentication. Entra tracing now records broker, cache, and interaction-mode decisions alongside timings, using the existing Git Trace2 settings. ([git-ecosystem/git-credential-manager#2408][pr-2408], [git-ecosystem/git-credential-manager#2450][pr-2450]) - **Newer Git credential-protocol support.** GCM supports capability negotiation and the `state[]` and `continue` fields introduced in Git 2.46, providing infrastructure for multi-stage authentication. Existing authentication flows and compatibility with older Git versions are preserved. ([git-ecosystem/git-credential-manager#2357][pr-2357]) #### Fixes - Improve dispatcher failure and shutdown handling without starting the UI framework for operations that do not need it. ([git-ecosystem/git-credential-manager#2451][pr-2451]) - Respect Git configuration `include` and `includeIf` files in scoped queries, avoiding duplicate configuration entries when settings already exist in an included file. ([git-ecosystem/git-credential-manager#2345][pr-2345]) #### Installation and contributor changes - The install-from-source helper now supports both macOS and Linux at `build/install-from-source.sh`. It defaults to a trimmed, self-contained build; use `--aot` to opt into native compilation and its additional toolchain requirements. See the [installation instructions][install-from-source]. - Source builds now use `git-credential-manager.slnx`, with libraries and tests directly under `src/` and packaging scripts under `build/`. A solution build no longer runs packaging; use the per-platform distribution projects for that. See the [development guide][development]. ([git-ecosystem/git-credential-manager#2367][pr-2367]) - Windows x64 and ARM64 packages use the 64-bit Inno Setup installer; x86 packages retain a 32-bit installer. ([git-ecosystem/git-credential-manager#2380][pr-2380]) - Internal credential-helper actions (`get`, `store`, `erase`, and `capability`) are hidden from `--help`, but remain available for Git to invoke. ([git-ecosystem/git-credential-manager#2357][pr-2357]) **Changelog:** [v2.9.1...v3.0.0][full-changelog] [point1-changelog]: https://redirect.github.com/git-ecosystem/git-credential-manager/compare/v3.0.0...v3.0.1 [azrepos-tokens]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/docs/azrepos-users-and-tokens.md [broker]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/docs/msauth-broker.md [development]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/docs/development.md [dotnet-support]: https://redirect.github.com/dotnet/core/blob/main/release-notes/10.0/supported-os.md [full-changelog]: https://redirect.github.com/git-ecosystem/git-credential-manager/compare/v2.9.1...v3.0.0 [install-from-source]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/docs/install.md#install-from-source-helper-script [legacy-client]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/docs/configuration.md#credentialazreposuselegacyclientid [supported-environments]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.1/README.md#supported-environments [pr-2345]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2345 [pr-2357]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2357 [pr-2365]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2365 [pr-2366]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2366 [pr-2367]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2367 [pr-2377]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2377 [pr-2379]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2379 [pr-2380]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2380 [pr-2408]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2408 [pr-2415]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2415 [pr-2416]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2416 [pr-2423]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2423 [pr-2425]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2425 [pr-2433]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2433 [pr-2440]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2440 [pr-2445]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2445 [pr-2449]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2449 [pr-2450]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2450 [pr-2451]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2451 ### [`v3.0.0`](https://redirect.github.com/git-ecosystem/git-credential-manager/releases/tag/v3.0.0): GCM 3.0.0 [Compare Source](https://redirect.github.com/git-ecosystem/git-credential-manager/compare/v2.9.1...v3.0.0) Git Credential Manager 3.0 brings native ahead-of-time compilation, Microsoft authentication broker support across Windows, macOS, and Linux, and a refreshed terminal experience. These notes cover changes since **GCM 2.9.1**. > \[!IMPORTANT] > This release changes supported operating systems and the default Azure Repos authentication experience. Review the breaking changes before upgrading. #### Breaking changes and upgrade notes ##### Updated platform and .NET requirements GCM now targets **.NET 10 on all platforms**. Windows builds no longer use .NET Framework. | Platform or installation method | Requirement | | ------------------------------- | --------------------------------------------------------- | | Windows | Windows 10 or later; Windows Server 2016 or later | | macOS | macOS 14 or later | | Linux | A distribution supported by .NET 10 | | .NET tool | Install the .NET 10 SDK before installing or updating GCM | See the [supported environments][supported-environments] and [.NET 10 support matrix][dotnet-support] for details. Standalone platform packages do **not** require a separate .NET installation. **Windows 7 and Windows 8.x are no longer supported by GCM 3.x.** GCM 2.9.x will receive minimal, security-only maintenance for those systems, but no new features. Upgrading Windows is recommended. ([git-ecosystem/git-credential-manager#2365][pr-2365], [git-ecosystem/git-credential-manager#2367][pr-2367]) ##### Azure Repos uses OAuth tokens by default GCM now returns Microsoft identity **OAuth tokens**, rather than creating personal access tokens (PATs), by default for Azure Repos. OAuth tokens are automatically refreshed as needed. Explicit credential-type settings are still respected. If you need the previous PAT behavior, set: ```shell git config --global credential.azreposCredentialType pat ``` The equivalent environment variable is `GCM_AZREPOS_CREDENTIALTYPE=pat`. See [Azure Repos users and tokens][azrepos-tokens]. ([git-ecosystem/git-credential-manager#2449][pr-2449]) ##### Microsoft authentication uses the OS broker by default Broker integration is now enabled by default wherever supported, rather than requiring an opt-in. This applies to Microsoft authentication, such as Azure Repos; it does not change authentication for GitHub, Bitbucket, or GitLab. On macOS, broker authentication requires Company Portal and device enrollment. On Linux, it requires the supported Intune setup, a GNOME desktop, and Microsoft Edge; headless and WSL environments do not support the Linux broker. > \[!WARNING] > Depending on your organization's policies, broker sign-in can prompt you to join or enroll your device. On Windows, signing in with a personal Microsoft account can also affect the account linked to your local Windows user. Review the [broker documentation][broker] before proceeding, especially on personal devices. To opt out: ```shell git config --global credential.msauthUseBroker false ``` The equivalent environment variable is `GCM_MSAUTH_USEBROKER=false`. When the broker is in use, it takes precedence over `credential.msauthFlow`. ([git-ecosystem/git-credential-manager#2449][pr-2449]) ##### Azure Repos uses a dedicated GCM Entra application GCM now signs in using its own first-party Microsoft Entra application instead of the Visual Studio application. This enables broker support on macOS and Linux, in addition to Windows. If you encounter a client-application configuration error, GCM provides guidance for retrying with the legacy application; it does **not** silently switch back. For a one-command compatibility retry: ```shell git -c credential.azreposUseLegacyClientId=true fetch ``` Please report the original failure if this workaround succeeds. The legacy application does not support broker authentication on macOS or Linux. Managed identity, service-principal, and workload-identity federation flows are unaffected by the application change. The undocumented developer overrides `credential.azreposDevClientId` and `credential.azreposDevAuthorityBaseUri`, and their environment-variable equivalents `GCM_DEV_AZREPOS_CLIENTID` and `GCM_DEV_AZREPOS_AUTHORITYBASEURI`, have been removed. The [legacy-client setting][legacy-client] is a focused compatibility option, not an arbitrary client-ID or authority override. ([git-ecosystem/git-credential-manager#2416][pr-2416]) ##### The embedded Microsoft sign-in web view has been removed The Windows-only embedded web view depended on .NET Framework and is no longer available. Use the broker, system browser, or device-code flow instead. If you previously forced `credential.msauthFlow=embedded` or `GCM_MSAUTH_FLOW=embedded`, change it to `auto`, `system`, or `devicecode`. Disable broker integration as described above if you specifically need to force a non-broker flow. ([git-ecosystem/git-credential-manager#2365][pr-2365]) ##### Terminal and diagnostic output has changed Terminal selection prompts now use arrow-key navigation instead of numbered input, and `diagnose` has a new output format. Automation that drives interactive menus or parses diagnostic text may need updating. Git's credential-protocol input and output remain separate from interactive prompts. ([git-ecosystem/git-credential-manager#2377][pr-2377], [git-ecosystem/git-credential-manager#2425][pr-2425]) #### Features and improvements - **Native ahead-of-time builds.** Published platform packages compile GCM to native code to reduce startup overhead. The .NET tool remains a framework-dependent distribution. ([git-ecosystem/git-credential-manager#2366][pr-2366], [git-ecosystem/git-credential-manager#2367][pr-2367]) - **Cross-platform Microsoft single sign-on.** The authentication broker can reuse OS accounts on supported Windows, macOS, and Linux installations. When a default OS account can be used, GCM asks for confirmation unless automatic use is explicitly enabled, or enabled by default in environments such as Microsoft Dev Box. Set `credential.msauthUseDefaultAccount=false` to skip the default-account attempt. See the [broker documentation][broker]. ([git-ecosystem/git-credential-manager#2379][pr-2379], [git-ecosystem/git-credential-manager#2416][pr-2416]) - **Optional isolated Azure Repos token cache.** Set `credential.azreposUseMicrosoftSharedCache=false`, or `GCM_AZREPOS_USE_MSFT_CACHE=false`, to use a GCM-specific cache. Sharing with other Microsoft developer tools remains the default. ([git-ecosystem/git-credential-manager#2415][pr-2415]) - **Support for Bitbucket Cloud's updated OAuth tokens.** Rotating refresh tokens are now consistently saved against the resolved Bitbucket username, avoiding repeated sign-ins caused by reusing an old refresh token. Large access and refresh tokens are split across credential entries when needed, so Windows users can keep the default `wincredman` store without switching to another credential store. ([git-ecosystem/git-credential-manager#2433][pr-2433], [git-ecosystem/git-credential-manager#2440][pr-2440]) - **Generic OAuth beyond HTTP(S).** Generic OAuth configuration now works for non-HTTP credential requests, such as SMTP authentication for `git send-email`. Windows Integrated Authentication remains HTTP(S)-only. ([git-ecosystem/git-credential-manager#2445][pr-2445]) - **Refreshed terminal prompts and diagnostics.** Interactive prompts use Spectre.Console, and Ctrl+C during a prompt restores the terminal and exits cleanly with status 130. `git-credential-manager diagnose` distinguishes passed, warning, failed, and skipped checks, reports the actual credential store, and summarizes generated logs. Add `--strict` to return a non-zero exit code for warnings as well as errors; without it, only errors fail. ([git-ecosystem/git-credential-manager#2377][pr-2377], [git-ecosystem/git-credential-manager#2423][pr-2423], [git-ecosystem/git-credential-manager#2425][pr-2425]) - **More complete Trace2 diagnostics.** Expanded instrumentation covers command execution, configuration, credential storage, UI startup, and authentication. Entra tracing now records broker, cache, and interaction-mode decisions alongside timings, using the existing Git Trace2 settings. ([git-ecosystem/git-credential-manager#2408][pr-2408], [git-ecosystem/git-credential-manager#2450][pr-2450]) - **Newer Git credential-protocol support.** GCM supports capability negotiation and the `state[]` and `continue` fields introduced in Git 2.46, providing infrastructure for multi-stage authentication. Existing authentication flows and compatibility with older Git versions are preserved. ([git-ecosystem/git-credential-manager#2357][pr-2357]) #### Fixes - Improve dispatcher failure and shutdown handling without starting the UI framework for operations that do not need it. ([git-ecosystem/git-credential-manager#2451][pr-2451]) - Respect Git configuration `include` and `includeIf` files in scoped queries, avoiding duplicate configuration entries when settings already exist in an included file. ([git-ecosystem/git-credential-manager#2345][pr-2345]) #### Installation and contributor changes - The install-from-source helper now supports both macOS and Linux at `build/install-from-source.sh`. It defaults to a trimmed, self-contained build; use `--aot` to opt into native compilation and its additional toolchain requirements. See the [installation instructions][install-from-source]. - Source builds now use `git-credential-manager.slnx`, with libraries and tests directly under `src/` and packaging scripts under `build/`. A solution build no longer runs packaging; use the per-platform distribution projects for that. See the [development guide][development]. ([git-ecosystem/git-credential-manager#2367][pr-2367]) - Windows x64 and ARM64 packages use the 64-bit Inno Setup installer; x86 packages retain a 32-bit installer. ([git-ecosystem/git-credential-manager#2380][pr-2380]) - Internal credential-helper actions (`get`, `store`, `erase`, and `capability`) are hidden from `--help`, but remain available for Git to invoke. ([git-ecosystem/git-credential-manager#2357][pr-2357]) **Full changelog:** [v2.9.1...v3.0.0][full-changelog] [azrepos-tokens]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/docs/azrepos-users-and-tokens.md [broker]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/docs/msauth-broker.md [development]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/docs/development.md [dotnet-support]: https://redirect.github.com/dotnet/core/blob/main/release-notes/10.0/supported-os.md [full-changelog]: https://redirect.github.com/git-ecosystem/git-credential-manager/compare/v2.9.1...v3.0.0 [install-from-source]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/docs/install.md#install-from-source-helper-script [legacy-client]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/docs/configuration.md#credentialazreposuselegacyclientid [supported-environments]: https://redirect.github.com/git-ecosystem/git-credential-manager/blob/v3.0.0/README.md#supported-environments [pr-2345]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2345 [pr-2357]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2357 [pr-2365]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2365 [pr-2366]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2366 [pr-2367]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2367 [pr-2377]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2377 [pr-2379]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2379 [pr-2380]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2380 [pr-2408]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2408 [pr-2415]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2415 [pr-2416]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2416 [pr-2423]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2423 [pr-2425]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2425 [pr-2433]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2433 [pr-2440]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2440 [pr-2445]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2445 [pr-2449]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2449 [pr-2450]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2450 [pr-2451]: https://redirect.github.com/git-ecosystem/git-credential-manager/pull/2451 </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/tak848/dotfiles). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSIsInVwZGF0ZV9tYWpvciJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: tak-automation[bot] <221638520+tak-automation[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GCM already emits Trace2 events, but the implementation is owned by
CommandContexteven though Trace2 represents a single process-wide event stream. This prevents tracing from starting before context construction and requires the tracer to be passed through services that cannot meaningfully replace it.The existing implementation also attributes asynchronous work to physical managed threads, reports some errors through tracing-specific exception types, and leaves major command, UI, and authentication boundaries uninstrumented.
This PR:
Trace2 continues to honour the existing Git environment variables and configuration settings, and supports event, normal, and performance output formats. The added instrumentation records control-flow and configuration choices without recording credentials.
The series is organised as follows:
To keep the cross-cutting ownership migration reviewable, commits 3-7 are intentionally not independently buildable. Commit 8 completes the migration and restores a buildable tree. The remaining commits build normally.