fix(desktop): stop git.exe console flashes from workspace probes#3930
Merged
Conversation
DETACHED_PROCESS gave the probe git no console at all, so any console child git spawned (fsmonitor daemon, credential helper) allocated a new visible one - the repeated black windows in #3906. Route all workspace probes through workspaceGit: CREATE_NO_WINDOW so children inherit the invisible console, with fsmonitor and auto-maintenance disabled so probes never spawn background daemons. HideWindowDetached has no callers left and is removed.
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.
Root cause
#2935 switched the desktop's workspace git probes to
DETACHED_PROCESSto stop the probe's own console from flashing. That worked for git itself — but a detached process has no console at all, so any console child that git spawns (most commonly thefsmonitor--daemonon repos withcore.fsmonitorenabled, or a credential helper) allocates a new visible console. With probes firing on app startup and on every file-change refresh, that's the stream of blackgit.exewindows reported in #3906 — including the focus steal that interrupts typing.Fix
workspaceGithelper:CREATE_NO_WINDOWinstead ofDETACHED_PROCESS— the probe gets an invisible console that its children inherit, so nothing down the tree can pop a window.-c core.fsmonitor=false -c maintenance.auto=false— a read-only probe should never spawn a background daemon in the first place, regardless of console flags.HideWindowDetachedhas no callers left and is removed (both build variants + its test).Verified:
internal/proctests pass, root and desktop modules build clean.Closes #3906