mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
fixes #49723
This commit is contained in:
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;
|
||||
|
||||
Reference in New Issue
Block a user