Commit fece098d authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-stash-{drop,pop}: ask for confirmation

`magit-stash-drop' did previously offer to act on another stash
instead, which some users, including myself, found inconvenient.
This was discussed in #2916.

`magit-stash-pop' did pop the stash without requiring confirmation,
which is unsafe because users might not expect "A" to do something
different on a stash than elsewhere.  This was discussed in #3220.
parent 82fedebd
...@@ -160,6 +160,13 @@ Changes since v2.11.0 ...@@ -160,6 +160,13 @@ Changes since v2.11.0
candidates to use the default instead, with or without confirmation. candidates to use the default instead, with or without confirmation.
#3232 #3232
* When there is a stash at point, then the commands `magit-stash-drop'
and `magit-stash-pop' now ask for confirmation. The former command
previously allowed users to select another stash instead and the
latter used to act on the stash at point without giving the user a
chance to abort. These changes are implemented using the new option
`magit-dwim-selection' and can easily be reverted. #2916
Fixes since v2.11.0 Fixes since v2.11.0
------------------- -------------------
......
...@@ -97,8 +97,8 @@ Only the following commands support this option: ...@@ -97,8 +97,8 @@ Only the following commands support this option:
(magit-stash-branch nil t) (magit-stash-branch nil t)
(magit-stash-branch-here nil t) (magit-stash-branch-here nil t)
(magit-stash-format-patch nil t) (magit-stash-format-patch nil t)
(magit-stash-drop nil nil) (magit-stash-drop nil ask)
(magit-stash-pop nil t)) (magit-stash-pop nil ask))
"When not to offer alternatives and ask for confirmation. "When not to offer alternatives and ask for confirmation.
Many commands by default ask the user to select from a list of Many commands by default ask the user to select from a list of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment