Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/extraction/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export function buildDefaultIgnore(rootDir: string): Ignore {
* (See issue #193.)
*/
function collectGitFiles(repoDir: string, prefix: string, files: Set<string>): void {
const gitOpts = { cwd: repoDir, encoding: 'utf-8' as const, timeout: 30000, maxBuffer: 50 * 1024 * 1024, stdio: ['pipe', 'pipe', 'pipe'] as ['pipe', 'pipe', 'pipe'] };
const gitOpts = { cwd: repoDir, encoding: 'utf-8' as const, timeout: 30000, maxBuffer: 50 * 1024 * 1024, stdio: ['pipe', 'pipe', 'pipe'] as ['pipe', 'pipe', 'pipe'], windowsHide: true };

// Tracked files. --recurse-submodules pulls in files from active submodules,
// which the index would otherwise represent only as a commit pointer.
Expand Down Expand Up @@ -241,7 +241,7 @@ function getGitVisibleFiles(rootDir: string): Set<string> | null {
const gitRoot = execFileSync(
'git',
['rev-parse', '--show-toplevel'],
{ cwd: rootDir, encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'] }
{ cwd: rootDir, encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'], windowsHide: true }
).trim();

if (path.resolve(gitRoot) !== path.resolve(rootDir)) {
Expand All @@ -250,7 +250,7 @@ function getGitVisibleFiles(rootDir: string): Set<string> | null {
execFileSync(
'git',
['check-ignore', '-q', path.resolve(rootDir)],
{ cwd: rootDir, encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'] }
{ cwd: rootDir, encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'], windowsHide: true }
);
// Directory is gitignored by parent repo — fall back to filesystem walk
return null;
Expand Down Expand Up @@ -291,7 +291,7 @@ function getGitChangedFiles(rootDir: string): GitChanges | null {
const output = execFileSync(
'git',
['status', '--porcelain', '--no-renames'],
{ cwd: rootDir, encoding: 'utf-8', timeout: 10000, stdio: ['pipe', 'pipe', 'pipe'] }
{ cwd: rootDir, encoding: 'utf-8', timeout: 10000, stdio: ['pipe', 'pipe', 'pipe'], windowsHide: true }
);

const modified: string[] = [];
Expand Down
2 changes: 2 additions & 0 deletions src/sync/git-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function isGitRepo(projectRoot: string): boolean {
cwd: projectRoot,
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'ignore'],
windowsHide: true,
}).trim();
return out === 'true';
} catch {
Expand All @@ -61,6 +62,7 @@ function gitHooksDir(projectRoot: string): string | null {
cwd: projectRoot,
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'ignore'],
windowsHide: true,
}).trim();
if (!out) return null;
return path.isAbsolute(out) ? out : path.resolve(projectRoot, out);
Expand Down
1 change: 1 addition & 0 deletions src/sync/worktree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export function gitWorktreeRoot(dir: string): string | null {
cwd: dir,
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'ignore'],
windowsHide: true,
}).trim();
return out ? realpath(out) : null;
} catch {
Expand Down