aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-reset.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2018-08-14 14:52:27 -0500
committerJonas Bernoulli <jonas@bernoul.li>2018-08-14 14:52:27 -0500
commite67294cf3a013f27ac91738c6c0d8b491a10566a (patch)
tree646a7fb6f9fc44d59ad7e0cc58e41e994bff29e8 /lisp/magit-reset.el
parent6234434553bddfdc7759e4423fcf3750dafb5a44 (diff)
magit-reset-index: Move definition
Diffstat (limited to 'lisp/magit-reset.el')
-rw-r--r--lisp/magit-reset.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/magit-reset.el b/lisp/magit-reset.el
index 1f56cf8..181acbc 100644
--- a/lisp/magit-reset.el
+++ b/lisp/magit-reset.el
@@ -41,15 +41,6 @@
:max-action-columns 1)
;;;###autoload
-(defun magit-reset-index (commit)
- "Reset the index to COMMIT.
-Keep the head and working tree as-is, so if COMMIT refers to the
-head this effectively unstages all changes.
-\n(git reset COMMIT .)"
- (interactive (list (magit-read-branch-or-commit "Reset index to")))
- (magit-reset-internal nil commit "."))
-
-;;;###autoload
(defun magit-reset (commit &optional hard)
"Reset the head and index to COMMIT, but not the working tree.
With a prefix argument also reset the working tree.
@@ -85,6 +76,15 @@ With a prefix argument also reset the working tree.
" reset %s to"))))
(magit-reset-internal "--hard" commit))
+;;;###autoload
+(defun magit-reset-index (commit)
+ "Reset the index to COMMIT.
+Keep the head and working tree as-is, so if COMMIT refers to the
+head this effectively unstages all changes.
+\n(git reset COMMIT .)"
+ (interactive (list (magit-read-branch-or-commit "Reset index to")))
+ (magit-reset-internal nil commit "."))
+
(defun magit-reset-read-branch-or-commit (prompt)
"Prompt for and return a ref to reset HEAD to.