From 78867ac94d1a2663b808475a9e8e7fe62d3cd05d Mon Sep 17 00:00:00 2001 From: Phil Jackson Date: Wed, 9 Jun 2010 21:57:10 +0100 Subject: [PATCH] `magit-maybe-create-local-tracking-branch' allows for no "refs/" string. --- magit.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magit.el b/magit.el index db5a216f..7d2553af 100644 --- a/magit.el +++ b/magit.el @@ -2582,7 +2582,7 @@ With prefix argument, add remaining untracked files as well. ;;; Branches (defun magit-maybe-create-local-tracking-branch (rev) - (if (string-match "^refs/remotes/\\([^/]+\\)/\\(.+\\)" rev) + (if (string-match "^\\(?:refs/\\)?remotes/\\([^/]+\\)/\\(.+\\)" rev) (let ((remote (match-string 1 rev)) (branch (match-string 2 rev))) (when (and (not (magit-ref-exists-p (concat "refs/heads/" branch))) @@ -4003,7 +4003,7 @@ Return values: (defun magit-branches-window-checkout () "Check out the branch in the line at point." (interactive) - (magit-run-git "checkout" (magit--branch-name-at-point)) + (magit-checkout (magit--branch-name-at-point)) (save-excursion (magit-show-branches)))