Commit 822e762c authored by Jonas Bernoulli's avatar Jonas Bernoulli

magit-reset-quickly: Move definition

This command isn't a popup action, so it shouldn't be
placed right between the popup and the action definitions.
parent bd8a8946
......@@ -42,19 +42,6 @@
(?f "reset a file" magit-file-checkout))
:max-action-columns 1)
;;;###autoload
(defun magit-reset-quickly (commit &optional hard)
"Reset the `HEAD' and index to COMMIT, and possibly the working tree.
With a prefix argument reset the working tree otherwise don't.
\n(git reset --mixed|--hard COMMIT)"
(interactive (list (magit-reset-read-branch-or-commit
(if current-prefix-arg
(concat (propertize "Hard" 'face 'bold)
" reset %s to")
"Reset %s to"))
current-prefix-arg))
(magit-reset-internal (if hard "--hard" "--mixed") commit))
;;;###autoload
(defun magit-reset-mixed (commit)
"Reset the `HEAD' and index to COMMIT, but not the working tree.
......@@ -97,6 +84,19 @@ Keep the `HEAD' and index as-is."
(magit-run-git "checkout-index" "--all" "--force")
(magit-wip-commit-after-apply nil " after reset")))
;;;###autoload
(defun magit-reset-quickly (commit &optional hard)
"Reset the `HEAD' and index to COMMIT, and possibly the working tree.
With a prefix argument reset the working tree otherwise don't.
\n(git reset --mixed|--hard COMMIT)"
(interactive (list (magit-reset-read-branch-or-commit
(if current-prefix-arg
(concat (propertize "Hard" 'face 'bold)
" reset %s to")
"Reset %s to"))
current-prefix-arg))
(magit-reset-internal (if hard "--hard" "--mixed") commit))
(defun magit-reset-read-branch-or-commit (prompt)
"Prompt for and return a ref to reset HEAD to.
......
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