check for the current branch before switching buffer
The wazzup buffer might already exist, so if we look at the branch name in it, it might refer to another branch, even another repository.
This commit is contained in:
parent
7c80c10199
commit
82b8d93731
1 changed files with 3 additions and 2 deletions
5
magit.el
5
magit.el
|
@ -3361,11 +3361,12 @@ Prefix arg means justify as well."
|
|||
|
||||
(defun magit-wazzup (&optional all)
|
||||
(interactive "P")
|
||||
(let* ((topdir (magit-get-top-dir default-directory)))
|
||||
(let ((topdir (magit-get-top-dir default-directory))
|
||||
(current-branch (magit-get-current-branch)))
|
||||
(switch-to-buffer "*magit-wazzup*")
|
||||
(magit-mode-init topdir 'wazzup
|
||||
#'magit-refresh-wazzup-buffer
|
||||
(magit-get-current-branch) all)))
|
||||
current-branch all)))
|
||||
|
||||
;;; Miscellaneous
|
||||
|
||||
|
|
Loading…
Reference in a new issue