|
@@ -191,7 +191,7 @@ export function buildDefaultIgnore(rootDir: string): Ignore {
|
|
|
* (See issue #193.)
|
|
* (See issue #193.)
|
|
|
*/
|
|
*/
|
|
|
function collectGitFiles(repoDir: string, prefix: string, files: Set<string>): void {
|
|
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,
|
|
// Tracked files. --recurse-submodules pulls in files from active submodules,
|
|
|
// which the index would otherwise represent only as a commit pointer.
|
|
// which the index would otherwise represent only as a commit pointer.
|
|
@@ -241,7 +241,7 @@ function getGitVisibleFiles(rootDir: string): Set<string> | null {
|
|
|
const gitRoot = execFileSync(
|
|
const gitRoot = execFileSync(
|
|
|
'git',
|
|
'git',
|
|
|
['rev-parse', '--show-toplevel'],
|
|
['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();
|
|
).trim();
|
|
|
|
|
|
|
|
if (path.resolve(gitRoot) !== path.resolve(rootDir)) {
|
|
if (path.resolve(gitRoot) !== path.resolve(rootDir)) {
|
|
@@ -250,7 +250,7 @@ function getGitVisibleFiles(rootDir: string): Set<string> | null {
|
|
|
execFileSync(
|
|
execFileSync(
|
|
|
'git',
|
|
'git',
|
|
|
['check-ignore', '-q', path.resolve(rootDir)],
|
|
['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
|
|
// Directory is gitignored by parent repo — fall back to filesystem walk
|
|
|
return null;
|
|
return null;
|
|
@@ -291,7 +291,7 @@ function getGitChangedFiles(rootDir: string): GitChanges | null {
|
|
|
const output = execFileSync(
|
|
const output = execFileSync(
|
|
|
'git',
|
|
'git',
|
|
|
['status', '--porcelain', '--no-renames'],
|
|
['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[] = [];
|
|
const modified: string[] = [];
|