From 78a3d703b0eeee71722aed5c2c2bf000825adb74 Mon Sep 17 00:00:00 2001 From: Phil Jackson Date: Wed, 1 Sep 2010 23:50:25 +0100 Subject: [PATCH] Added -n to push menu. Added magit-custom-options to push command. --- magit-key-mode.el | 4 +++- magit.el | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/magit-key-mode.el b/magit-key-mode.el index 82079193..85721c78 100644 --- a/magit-key-mode.el +++ b/magit-key-mode.el @@ -170,7 +170,9 @@ (pushing (actions - ("p" "Push" magit-push))) + ("p" "Push" magit-push)) + (switches + ("-d" "Dry run" "-n"))) (pulling (actions diff --git a/magit.el b/magit.el index b8d13084..683e803b 100644 --- a/magit.el +++ b/magit.el @@ -2967,10 +2967,11 @@ typing and automatically refreshes the status buffer." (if (and (not branch-remote) (not current-prefix-arg)) (magit-set push-remote "branch" branch "remote")) - (magit-run-git-async "push" "-v" push-remote - (if ref-branch - (format "%s:%s" branch ref-branch) - branch)) + (apply 'magit-run-git-async "push" "-v" push-remote + (if ref-branch + (format "%s:%s" branch ref-branch) + branch) + magit-custom-options) ;; Although git will automatically set up the remote, ;; it doesn't set up the branch to merge (at least as of Git 1.6.6.1), ;; so we have to do that manually.