summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2019-06-27 20:13:24 -0400
committerKyle Meyer <kyle@kyleam.com>2019-08-10 22:30:29 -0400
commitff7387c18860e54c28a19cb08b5adeba8a64a193 (patch)
treee5bb1b6a69b40174b48010aae5e2f3ae4654c780 /lisp
parentb2b47cfbfd6107c784c4a752ace17c321a7a467d (diff)
downloademacs.d-ff7387c18860e54c28a19cb08b5adeba8a64a193.tar.gz
magit: Add command for doing fast-forward merge of push branch
Diffstat (limited to 'lisp')
-rw-r--r--lisp/km-magit.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index e672ec8..b16c49b 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -125,6 +125,14 @@ branch."
(magit-merge-plain it '("--ff-only"))
(user-error "No upstream branch")))
+(defun km/magit-ff-merge-push ()
+ "Perform a fast-forward merge of the push branch.
+\n(git merge --no-edit --ff-only <push>)"
+ (interactive)
+ (--if-let (magit-get-push-branch)
+ (magit-merge-plain it '("--ff-only"))
+ (user-error "No push branch")))
+
;;;###autoload
(defun km/magit-merge-pull-message (rev)
"Generate a PR merge message for REV.