fixes #49723
This commit is contained in:
parent
ba076500a8
commit
42f6ffc872
3 changed files with 8 additions and 0 deletions
1
extensions/git/src/api/git.d.ts
vendored
1
extensions/git/src/api/git.d.ts
vendored
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue