| ... | @@ -420,9 +420,10 @@ function isNonRepositoryGitStderr(stderr: string): boolean { | ... | @@ -420,9 +420,10 @@ function isNonRepositoryGitStderr(stderr: string): boolean { |
| 420 | return stderr.toLowerCase().includes("not a git repository"); | 420 | return stderr.toLowerCase().includes("not a git repository"); |
| 421 | } | 421 | } |
| 422 | function isUnbornHeadStderr(stderr: string): boolean { | 422 | function isUnbornHeadStderr(stderr: string): boolean { |
| | 423 | const normalized = stderr.toLowerCase(); |
| 423 | return ( | 424 | return ( |
| 424 | stderr.toLowerCase().includes("unknown revision") && | 425 | normalized.includes("bad revision 'head'") || |
| 425 | stderr.toLowerCase().includes("path not in the working tree") | 426 | (normalized.includes("unknown revision") && normalized.includes("path not in the working tree")) |
| 426 | ); | 427 | ); |
| 427 | } | 428 | } |
| 428 | | 429 | |
| ... | @@ -1600,7 +1601,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* | ... | @@ -1600,7 +1601,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* |
| 1600 | executeGitWithStableDiagnostics( | 1601 | executeGitWithStableDiagnostics( |
| 1601 | "GitVcsDriver.statusDetails.numstat", | 1602 | "GitVcsDriver.statusDetails.numstat", |
| 1602 | cwd, | 1603 | cwd, |
| 1603 | ["diff", "HEAD", "--numstat"], | 1604 | ["diff", "HEAD", "--numstat", "--"], |
| 1604 | { allowNonZeroExit: true }, | 1605 | { allowNonZeroExit: true }, |
| 1605 | ).pipe( | 1606 | ).pipe( |
| 1606 | Effect.flatMap((result) => { | 1607 | Effect.flatMap((result) => { |
| ... | @@ -1642,7 +1643,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* | ... | @@ -1642,7 +1643,7 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function* |
| 1642 | ...gitCommandContext({ | 1643 | ...gitCommandContext({ |
| 1643 | operation: "GitVcsDriver.statusDetails.numstat", | 1644 | operation: "GitVcsDriver.statusDetails.numstat", |
| 1644 | cwd, | 1645 | cwd, |
| 1645 | args: ["diff", "HEAD", "--numstat"], | 1646 | args: ["diff", "HEAD", "--numstat", "--"], |
| 1646 | }), | 1647 | }), |
| 1647 | detail: "git diff HEAD --numstat failed.", | 1648 | detail: "git diff HEAD --numstat failed.", |
| 1648 | exitCode: result.exitCode, | 1649 | exitCode: result.exitCode, |