Better defaults for 'x'.

* magit.el (magit-reset-head): Default to "HEAD^" when there is no
commit at point.
This commit is contained in:
Marius Vollmer 2008-08-20 23:57:51 +03:00
parent 822adda331
commit 52f61d6107

View file

@ -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))))