fix(git): fence WSL login-shell stdout for all buffered git reads (#35053)

Buffered gitExecFileAsync reads now always fence login-shell rc output, and
non-zero exits de-fence error.stdout. The per-call captureWslLoginShellOutput
opt-in is removed since it is no longer meaningful.

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
OrcaWin
2026-10-30 06:14:18 -07:00
committed by GitHub
co-authored by OrcaWin
parent e65171ae01
commit d1aff3a5be
17 changed files with 74 additions and 160 deletions
@@ -69,8 +69,7 @@ export async function canCheckoutExistingLocalBranch(
const ref = `refs/heads/${name}`
const { stdout } = await gitExecFileAsync(['for-each-ref', '--format=%(refname)', ref], {
cwd: repoPath,
...gitOptions,
captureWslLoginShellOutput: true
...gitOptions
})
return stdout.split(/\r?\n/).includes(ref)
}