Add DirtyWorkTree git error matching to git exec (#73108)

This commit is contained in:
Rachel Macfarlane
2019-05-03 14:04:27 -07:00
committed by GitHub
parent b72fba1a56
commit a5455afcef

View File

@@ -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;