From 82b8d93731be867cd427f2b812acb54e3120dff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Sun, 28 Mar 2010 17:04:35 +0200 Subject: [PATCH] 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. --- magit.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/magit.el b/magit.el index 3576f5b8..aa506726 100644 --- a/magit.el +++ b/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