Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): Windows git reads no longer start a console host #19288

MergedAkiVonAkira(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/19288/headmerged by maria-rcks View on GitHub

Showing 3 changed files with 75 additions and 1 deletion.

x
0 of 3 viewed, 3 left
4 additions and 1 deletionapps/server/src/vcs/GitVcsDriverCore.tsModified
View file
@@ -37,7 +37,7 @@
import * as HostProcess from "@t3tools/shared/HostProcess";
import { compactTraceAttributes } from "@t3tools/shared/observability";
import { decodeJsonResult } from "@t3tools/shared/schemaJson";
-import { resolveSpawnCommand } from "@t3tools/shared/shell";
+import { resolveSpawnCommand, runsGitWithoutConsole } from "@t3tools/shared/shell";
import { parseT3ProjectFile } from "@t3tools/shared/t3ProjectFile";
import { resolveProjectFileBackedSetting } from "@t3tools/shared/projectSettings";
import { gitCommandDuration, gitCommandsTotal, withMetrics } from "../observability/Metrics.ts";
@@ -994,6 +994,9 @@
cwd: commandInput.cwd,
env: spawnEnv,
forceKillAfter: input.forceKillAfterMs,
+ ...(runsGitWithoutConsole(hostPlatform, executable, commandInput.args)
+ ? { detached: true, windowsHide: true }
+ : {}),
.pipe(
31 additions and 0 deletionspackages/shared/src/shell.test.tsModified
View file
@@ -32,6 +32,7 @@
resolveCommandPath,
resolveSpawnCommand,
resolveWindowsEnvironment,
+ runsGitWithoutConsole,
SpawnExecutableResolution,