Use `magit-section-case' to get branch from wazzup.

This commit is contained in:
Phil Jackson 2010-05-06 00:27:20 +01:00
parent 179f1b9809
commit 8bf8a36db6

View file

@ -2558,9 +2558,10 @@ Fails if working tree or staging area contain uncommitted changes.
;;; Merging
(defun magit-guess-branch ()
(let ((sec (magit-current-section)))
(if (and sec (eq (magit-section-type sec) 'wazzup))
(magit-section-info sec))))
(magit-section-case (item info)
((wazzup commit)
(magit-section-info (magit-section-parent item)))
((wazzup) info)))
(defun magit-manual-merge (rev)
"Merge REVISION into the current 'HEAD'; leave changes uncommitted.