Fix `magit--branch-name-at-point'.

This commit is contained in:
Phil Jackson 2010-04-01 01:23:36 +01:00
parent ad686c5938
commit e6e77c611f

View file

@ -3574,10 +3574,7 @@ Will remove the 'remotes/' prefix if it exists."
(defun magit--branch-name-at-point () (defun magit--branch-name-at-point ()
"Get the branch name in the line at point." "Get the branch name in the line at point."
(let ((branch (magit--branch-name-from-line (thing-at-point 'line)))) (let ((branch (magit--branch-name-from-line (thing-at-point 'line))))
(if (or (= (point) (point-max)) (or branch (error "No branch at point"))))
(not branch))
(error "No branch found in current line"))
branch))
(defun magit-branches-window-checkout () (defun magit-branches-window-checkout ()
"Check out the branch in the line at point." "Check out the branch in the line at point."