fix(windows): treat root-equivalent show-cdup as non-nested
This commit is contained in:
@@ -105,7 +105,8 @@ function getInitGitState(cwd) {
|
|||||||
try {
|
try {
|
||||||
const cdupResult = execGit(['rev-parse', '--show-cdup'], { cwd, timeout: 5000 });
|
const cdupResult = execGit(['rev-parse', '--show-cdup'], { cwd, timeout: 5000 });
|
||||||
if (cdupResult.exitCode === 0) {
|
if (cdupResult.exitCode === 0) {
|
||||||
inNestedSubdir = String(cdupResult.stdout || '').trim().length > 0;
|
const cdup = String(cdupResult.stdout || '').trim().replace(/\\/g, '/');
|
||||||
|
inNestedSubdir = cdup.length > 0 && cdup !== '.' && cdup !== './';
|
||||||
} else {
|
} else {
|
||||||
inNestedSubdir = worktreeRoot !== null;
|
inNestedSubdir = worktreeRoot !== null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user