diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 3132b8cdf8629304b85b33ef7f6781624ea9f4bd..42952e0ca05275c0eb7d4a6be21aa1ba5677cd53 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -306,6 +306,8 @@ function getGitErrorCode(stderr: string): string | undefined { return GitErrorCodes.BranchAlreadyExists; } else if (/'.+' is not a valid branch name/.test(stderr)) { return GitErrorCodes.InvalidBranchName; + } else if (/Please,? commit your changes or stash them/.test(stderr)) { + return GitErrorCodes.DirtyWorkTree; } return undefined;