Add force checkout and smart checkout

This commit is contained in:
kingwl
2020-05-12 00:36:28 +08:00
parent ce3426e478
commit 8561cbb8ae
2 changed files with 57 additions and 13 deletions

View File

@@ -1298,6 +1298,7 @@ export class Repository {
} catch (err) {
if (/Please,? commit your changes or stash them/.test(err.stderr || '')) {
err.gitErrorCode = GitErrorCodes.DirtyWorkTree;
err.gitTreeish = treeish;
}
throw err;