Commit f00dedd6 authored by Kyle Meyer's avatar Kyle Meyer

magit-stash-drop: abort if multi-stash deletion is not confirmed

Fixes #2917.
parent 6bd79581
......@@ -4,5 +4,9 @@ Magit v2.10.1 Release Notes
Fixes since v2.10.0
-------------------
* When multiple stashes were selected by the region, responding "no"
when asked to confirm the deletion of these stashes resulted in a
type error. #2917
Authors
-------
......@@ -214,7 +214,8 @@ and forgo removing the stash."
"Remove a stash from the stash list.
When the region is active offer to drop all contained stashes."
(interactive (list (--if-let (magit-region-values 'stash)
(magit-confirm t nil "Drop %i stashes" it)
(or (magit-confirm t nil "Drop %i stashes" it)
(user-error "Abort"))
(magit-read-stash "Drop stash"))))
(dolist (stash (if (listp stash)
(nreverse (prog1 stash (setq stash (car stash))))
......
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