Fixed `magit-goto-previous-section' not showing proper commit in

commit buffer.

* magit.el (magit-show-commit): don't shadow "commit" parameter in let
form
* magit.el (magit-show-commit): accept both string and section struct
as "commit" parameter
This commit is contained in:
Marcin Bachry 2008-10-26 13:22:51 +01:00 committed by Marius Vollmer
parent e2fa665ba1
commit 0bbb824fcd

View file

@ -1397,8 +1397,9 @@ in log buffer."
"git" "log" "--max-count=1" "--cc" "-p" commit)))
(defun magit-show-commit (commit &optional scroll)
(when (magit-section-p commit)
(setq commit (magit-section-info commit)))
(let ((dir default-directory)
(commit (magit-commit-at-point))
(buf (get-buffer-create "*magit-commit*")))
(cond ((equal magit-currently-shown-commit commit)
(let ((win (get-buffer-window buf)))