emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit f53148a: magit-unstage-all: Don't prompt if the


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit f53148a: magit-unstage-all: Don't prompt if there is nothing to unstage
Date: Tue, 28 Sep 2021 09:57:43 -0400 (EDT)

branch: elpa/git-commit
commit f53148a569191bdbfb78d76f28481b91c60cb846
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    magit-unstage-all: Don't prompt if there is nothing to unstage
    
    Instead error out.
    
    Closes #4513.
---
 lisp/magit-apply.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/magit-apply.el b/lisp/magit-apply.el
index fcd7792..4e7ee00 100644
--- a/lisp/magit-apply.el
+++ b/lisp/magit-apply.el
@@ -449,6 +449,8 @@ without requiring confirmation."
 (defun magit-unstage-all ()
   "Remove all changes from the staging area."
   (interactive)
+  (unless (magit-anything-staged-p)
+    (user-error "Nothing to unstage"))
   (when (or (magit-anything-unstaged-p)
             (magit-untracked-files))
     (magit-confirm 'unstage-all-changes))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]