summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
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.