提交 42f6ffc8 编写于 作者: J Joao Moreno

fixes #49723

上级 ba076500
......@@ -141,6 +141,7 @@ export const enum GitErrorCodes {
NotAGitRepository = 'NotAGitRepository',
NotAtRepositoryRoot = 'NotAtRepositoryRoot',
Conflict = 'Conflict',
StashConflict = 'StashConflict',
UnmergedChanges = 'UnmergedChanges',
PushRejected = 'PushRejected',
RemoteConnectionError = 'RemoteConnectionError',
......
......@@ -1892,6 +1892,11 @@ export class CommandCenter {
type = 'warning';
options.modal = false;
break;
case GitErrorCodes.StashConflict:
message = localize('stash merge conflicts', "There were merge conflicts while applying the stash.");
type = 'warning';
options.modal = false;
break;
case GitErrorCodes.NoUserNameConfigured:
case GitErrorCodes.NoUserEmailConfigured:
message = localize('missing user info', "Make sure you configure your 'user.name' and 'user.email' in git.");
......
......@@ -1287,6 +1287,8 @@ export class Repository {
err.gitErrorCode = GitErrorCodes.NoStashFound;
} else if (/error: Your local changes to the following files would be overwritten/.test(err.stderr || '')) {
err.gitErrorCode = GitErrorCodes.LocalChangesOverwritten;
} else if (/^CONFLICT/m.test(err.stdout || '')) {
err.gitErrorCode = GitErrorCodes.StashConflict;
}
throw err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册