From 9af5c9b7076d745965c7f1b9db196601231c8041 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Sun, 22 Mar 2009 01:21:02 +0200 Subject: [PATCH] When pulling, ask for branch if none is configured. * magit.el (magit-pull): Here. --- magit.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index 330c6af2..91d6601d 100644 --- a/magit.el +++ b/magit.el @@ -2161,7 +2161,13 @@ in log buffer." (defun magit-pull () (interactive) - (magit-run-git-async "pull" "-v")) + (let* ((branch (magit-get-current-branch)) + (config-branch (and branch (magit-get "branch" branch "merge"))) + (merge-branch (or config-branch + (magit-read-rev (format "Pull from"))))) + (if (and branch (not config-branch)) + (magit-set merge-branch "branch" branch "merge")) + (magit-run-git-async "pull" "-v"))) (defun magit-read-remote (prompt def) (completing-read (if def