Fixed usage of magit-custom-options on some commands

It is not good to have magit-custom-options when it is nil into the
middle of the list of arguments.
This commit is contained in:
Oscar Fuentes 2010-05-18 19:50:19 +02:00
parent 57fa9eb0fd
commit ad5829a2f4

View file

@ -2700,8 +2700,8 @@ If REVISION is a remote branch, offer to create a local tracking branch.
(interactive (list (magit-read-rev "Switch to" (magit-default-rev))))
(if rev
(if (not (magit-maybe-create-local-tracking-branch rev))
(apply 'magit-run-git "checkout" magit-custom-options
(magit-rev-to-git rev)))))
(magit-run-git "checkout" (append magit-custom-options
(magit-rev-to-git rev))))))
(defun magit-read-create-branch-args ()
(let* ((cur-branch (magit-get-current-branch))
@ -2716,10 +2716,11 @@ Fails if working tree or staging area contain uncommitted changes.
(interactive (magit-read-create-branch-args))
(if (and branch (not (string= branch ""))
parent)
(apply 'magit-run-git "checkout" "-b"
magit-custom-options
branch
(magit-rev-to-git parent))))
(magit-run-git "checkout" "-b"
(append
magit-custom-options
branch
(magit-rev-to-git parent)))))
(defun magit-delete-branch (branch)
"Asks for a branch and deletes it.
@ -2731,8 +2732,8 @@ If the branch is the current one, offers to switch to `master' first.
(magit-checkout "master")
(setq branch nil)))
(when branch
(apply 'magit-run-git "branch" "-d" magit-custom-options
(magit-rev-to-git branch))))
(magit-run-git "branch" "-d" (append magit-custom-options
(magit-rev-to-git branch)))))
(defun magit-move-branch (old new)
"Renames or moves a branch.