(defun my-git-current-branch () (format "(%s)" (magit-get-current-branch)))
(defun uniquify-rename-buffer (item newname)
(let ((buffer (uniquify-item-buffer item)))
(let ((uniquify-buffer-name-style nil)) ;Avoid hooks on rename-buffer.
;; Pass the `unique' arg, so the advice doesn't mark it as unmanaged.
(if (fboundp 'magit-get-current-branch)
(let ((magitname (magit-get-current-branch)))
(if (not (null magitname))
(setq newname (concat (my-git-current-branch) newname)))))
;;(message (concat ":::::" newname))
(rename-buffer newname t)))))