未验证 提交 544c986e 编写于 作者: D Dor Mesica 提交者: GitHub

Added a warning before dropping a stash. (#94267)

* Added a message before dropping a stash.

* Update extensions/git/src/commands.ts
Co-authored-by: NJoão Moreno <mail@joaomoreno.com>
上级 5afaec5c
......@@ -2506,6 +2506,16 @@ export class CommandCenter {
return;
}
// request confirmation for the operation
const yes = localize('yes', "Yes");
const result = await window.showWarningMessage(
localize('sure drop', "Are you sure you want to drop the stash: {0}?", stash.description),
yes
);
if (result !== yes) {
return;
}
await repository.dropStash(stash.index);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册