Checking out of commits.

This commit is contained in:
Marius Vollmer 2008-08-11 15:42:23 +03:00
parent 3aa3f478e9
commit a63fbfa2ce

View file

@ -687,6 +687,7 @@ pushed.
(define-key magit-log-mode-map (kbd "RET") 'magit-show-commit) (define-key magit-log-mode-map (kbd "RET") 'magit-show-commit)
(define-key magit-log-mode-map (kbd "R") 'magit-revert-commit) (define-key magit-log-mode-map (kbd "R") 'magit-revert-commit)
(define-key magit-log-mode-map (kbd "P") 'magit-pick-commit) (define-key magit-log-mode-map (kbd "P") 'magit-pick-commit)
(define-key magit-log-mode-map (kbd "C") 'magit-checkout-commit)
(define-key magit-log-mode-map (kbd "q") 'magit-quit)) (define-key magit-log-mode-map (kbd "q") 'magit-quit))
(defvar magit-log-mode-hook nil) (defvar magit-log-mode-hook nil)
@ -718,6 +719,10 @@ pushed.
(interactive) (interactive)
(magit-run "git" "cherry-pick" "--no-commit" (magit-commit-at-point))) (magit-run "git" "cherry-pick" "--no-commit" (magit-commit-at-point)))
(defun magit-checkout-commit ()
(interactive)
(magit-run "git" "checkout" (magit-commit-at-point)))
(defun magit-show-commit () (defun magit-show-commit ()
(interactive) (interactive)
(let ((commit (magit-commit-at-point)) (let ((commit (magit-commit-at-point))