If you do
.  magit-status on repository .../x
.  V (magit-show-branches)
.  magit-status on repository .../y
.  V (magit-show-branches)

you get the branch listing for repository .../x

Also, as a side issue, functionality of a buffer should not be
keyed off of the buffer name (in this case, renaming the buffer 
should not change what V or g does).

The following patch deals with both of these.  
    

diff --git a/magit.el b/magit.el
index 0b3df34..45836c4 100644
--- a/magit.el
+++ b/magit.el
@@ -3788,8 +3788,10 @@ With prefix force the removal even it it hasn't been 
merged."
 (defun magit-show-branches ()
   "Show all of the current branches in other-window."
   (interactive)
-  (unless (string= (buffer-name) magit-branches-buffer-name)
-    (switch-to-buffer-other-window magit-branches-buffer-name))
+  (unless (eq major-mode 'magit-show-branches-mode)
+    (let ((topdir (magit-get-top-dir default-directory)))
+      (switch-to-buffer-other-window magit-branches-buffer-name)
+      (setq default-directory topdir)))
   (let ((inhibit-read-only t)
         (branches (mapcar 'magit--branch-view-details
                           (magit-git-lines "branch" "-va"))))



-- 
Subscription settings: http://groups.google.com/group/magit/subscribe?hl=en

Reply via email to