mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
Remove inline git revert confirmation alert (Issue #43625)
This commit is contained in:
@@ -775,15 +775,6 @@ export class CommandCenter {
|
||||
|
||||
const originalUri = toGitUri(modifiedUri, '~');
|
||||
const originalDocument = await workspace.openTextDocument(originalUri);
|
||||
const basename = path.basename(modifiedUri.fsPath);
|
||||
const message = localize('confirm revert', "Are you sure you want to revert the selected changes in {0}?", basename);
|
||||
const yes = localize('revert', "Revert Changes");
|
||||
const pick = await window.showWarningMessage(message, { modal: true }, yes);
|
||||
|
||||
if (pick !== yes) {
|
||||
return;
|
||||
}
|
||||
|
||||
const result = applyLineChanges(originalDocument, modifiedDocument, changes);
|
||||
const edit = new WorkspaceEdit();
|
||||
edit.replace(modifiedUri, new Range(new Position(0, 0), modifiedDocument.lineAt(modifiedDocument.lineCount - 1).range.end), result);
|
||||
|
||||
Reference in New Issue
Block a user