aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-reset.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2018-10-12 22:49:47 +0200
committerJonas Bernoulli <jonas@bernoul.li>2018-10-12 23:05:29 +0200
commit822e762cd7178983b36c583c2a36273513d9045a (patch)
tree4a3dbdceb5be3dddd6ce440e8ed1b21ad9950a32 /lisp/magit-reset.el
parentbd8a8946029b855132a77de40cb51fb902a205ca (diff)
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.
Diffstat (limited to 'lisp/magit-reset.el')
-rw-r--r--lisp/magit-reset.el26
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/magit-reset.el b/lisp/magit-reset.el
index 0499173..c337e48 100644
--- a/lisp/magit-reset.el
+++ b/lisp/magit-reset.el
@@ -43,19 +43,6 @@
: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.
\n(git reset --mixed COMMIT)"
@@ -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.