Commit 820ade72 authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-reset-popup: new command

parent 99131956
......@@ -15,6 +15,9 @@ Updates since v2.5.0
one or more comma-separated and refspecs, which are explicitly typed
in the minibuffer.
* Added new command `magit-reset-popup' featuring all the available
reset variants.
* When washing the diff that is to be displayed while writing a
commit message takes too long, then it is now possible to abort that
by pressing `C-g'. Previously that would have aborted the commit.
......
......@@ -349,6 +349,7 @@ starts complicating other things, then it will be removed."
(define-key map "w" 'magit-am-popup)
(define-key map "W" 'magit-patch-popup)
(define-key map "x" 'magit-reset)
(define-key map "X" 'magit-reset-popup)
(define-key map "y" 'magit-show-refs-popup)
(define-key map "Y" 'magit-cherry)
(define-key map "z" 'magit-stash-popup)
......
......@@ -1901,6 +1901,17 @@ If no merge is in progress, do nothing."
;;;; Reset
;;;###autoload (autoload 'magit-reset-popup "magit" nil t)
(magit-define-popup magit-reset-popup
"Popup console for reset commands."
'magit-commands
:man-page "git-reset"
:actions '((?m "reset mixed (HEAD and index)" magit-reset-head)
(?s "reset soft (HEAD only)" magit-reset-soft)
(?h "reset hard (HEAD, index, and files)" magit-reset-hard)
(?i "reset index (index only)" magit-reset-index))
:max-action-columns 1)
;;;###autoload
(defun magit-reset-index (commit)
"Reset the index to COMMIT.
......@@ -2397,6 +2408,7 @@ Currently this only adds the following key bindings.
(?V "Reverting" magit-revert-popup)
(?w "Apply patches" magit-am-popup)
(?W "Format patches" magit-patch-popup)
(?X "Resetting" magit-reset-popup)
(?y "Show Refs" magit-show-refs-popup)
(?z "Stashing" magit-stash-popup)
(?! "Running" magit-run-popup)
......
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