From feeb8cd46c80d6a86ff775f27da5b2d6ee5f3a78 Mon Sep 17 00:00:00 2001 From: Aaron Culich Date: Mon, 20 Sep 2010 20:56:26 -0700 Subject: [PATCH] like checkout, create-branch should also query if the user wants to save buffers and also update the modeline when the branch has been switched. --- magit.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index 1ecf1b8c..0a5720bb 100644 --- a/magit.el +++ b/magit.el @@ -2823,11 +2823,15 @@ Fails if working tree or staging area contain uncommitted changes. (interactive (magit-read-create-branch-args)) (if (and branch (not (string= branch "")) parent) + (magit-save-some-buffers) + (progn + (magit-save-some-buffers) (magit-run-git "checkout" "-b" branch (append magit-custom-options - (magit-rev-to-git parent))))) + (magit-rev-to-git parent))) + (magit-update-vc-modeline default-directory)))) (defun magit-delete-branch (branch) "Asks for a branch and deletes it.