We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5a596b commit f27183bCopy full SHA for f27183b
2 files changed
extensions/git/src/api/git.d.ts
@@ -216,5 +216,6 @@ export const enum GitErrorCodes {
216
WrongCase = 'WrongCase',
217
CantLockRef = 'CantLockRef',
218
CantRebaseMultipleBranches = 'CantRebaseMultipleBranches',
219
- PatchDoesNotApply = 'PatchDoesNotApply'
+ PatchDoesNotApply = 'PatchDoesNotApply',
220
+ NoPathFound = 'NoPathFound'
221
}
extensions/git/src/git.ts
@@ -1291,6 +1291,10 @@ export class Repository {
1291
1292
return result.stdout.trim();
1293
} catch (err) {
1294
+ if (/^fatal: no such path/.test(err.stderr || '')) {
1295
+ err.gitErrorCode = GitErrorCodes.NoPathFound;
1296
+ }
1297
+
1298
throw err;
1299
1300
0 commit comments