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.
This commit is contained in:
Aaron Culich 2010-09-20 20:56:26 -07:00 committed by Phil Jackson
parent 05c3e6fd10
commit feeb8cd46c

View file

@ -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.