Better defaults for 'x'.
* magit.el (magit-reset-head): Default to "HEAD^" when there is no commit at point.
This commit is contained in:
parent
822adda331
commit
52f61d6107
1 changed files with 3 additions and 1 deletions
4
magit.el
4
magit.el
|
@ -797,7 +797,9 @@ Please see the manual for a complete description of Magit.
|
||||||
;;; Resetting
|
;;; Resetting
|
||||||
|
|
||||||
(defun magit-reset-head (rev)
|
(defun magit-reset-head (rev)
|
||||||
(interactive (list (magit-read-rev "Reset head to" (magit-default-rev))))
|
(interactive (list (magit-read-rev "Reset head to"
|
||||||
|
(or (magit-default-rev)
|
||||||
|
"HEAD^"))))
|
||||||
(if rev
|
(if rev
|
||||||
(magit-run "git" "reset" "--soft" (magit-rev-to-git rev))))
|
(magit-run "git" "reset" "--soft" (magit-rev-to-git rev))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue