Soft resetting.

This commit is contained in:
Marius Vollmer 2008-08-06 14:48:03 +03:00
parent e9132a53d4
commit adfb76c91d

View file

@ -179,7 +179,7 @@
(define-key magit-keymap (kbd "a") 'magit-stage-thing-at-point)
(define-key magit-keymap (kbd "u") 'magit-unstage-thing-at-point)
(define-key magit-keymap (kbd "i") 'magit-ignore-thing-at-point)
(define-key magit-keymap (kbd "x") 'magit-revert-thing-at-point)
(define-key magit-keymap (kbd "x") 'magit-reset-soft)
(define-key magit-keymap (kbd "X") 'magit-reset-hard)
(define-key magit-keymap (kbd "RET") 'magit-visit-thing-at-point)
(define-key magit-keymap (kbd "b") 'magit-switch-branch)
@ -398,6 +398,10 @@
;;; Resetting
(defun magit-reset-soft (target)
(interactive (list (read-string "Reset to: " "HEAD^")))
(magit-run "git" "reset" "--soft" target))
(defun magit-reset-hard (target)
(interactive (list (read-string "Hard reset to: " "HEAD")))
(if (yes-or-no-p