diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-git.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el index 5d94c46..b43ee54 100644 --- a/lisp/init-git.el +++ b/lisp/init-git.el @@ -139,8 +139,11 @@ without requiring confirmation. "Create and checkout a local tracking branch for REMOTE-BRANCH. \n(git checkout -t REMOTE-BRANCH\)" (interactive - (list (magit-completing-read "Remote branch" - (magit-list-remote-branch-names)))) + (list (let ((branches (magit-list-remote-branch-names))) + (magit-completing-read + "Remote branch" branches nil t nil nil + (car (member (magit-branch-or-commit-at-point) + branches)))))) (magit-run-git "checkout" "-t" remote-branch)) (defun km/magit-delete-previous-branch (&optional force) |