diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-12-01 22:39:07 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-12-01 22:39:07 -0500 |
commit | 87a2c26d425f83cc053aaa4b46fb15a88bd9d6ce (patch) | |
tree | 5ef034443267f4c0e9fbc3a7b80a34bedb30f8ca | |
parent | 693aa551f5741b8190350629f818770c60fdc5cb (diff) | |
download | emacs.d-87a2c26d425f83cc053aaa4b46fb15a88bd9d6ce.tar.gz |
Add command magit-ff-merge-upstream
-rw-r--r-- | lisp/init-git.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el index a166c60..f50237e 100644 --- a/lisp/init-git.el +++ b/lisp/init-git.el @@ -48,6 +48,14 @@ function for calling from outside Magit buffers." (interactive) (magit-commit-extend '("--all"))) +(defun km/magit-ff-merge-upstream () + "Perform fast-forward merge of upstream branch. +\n(git merge --no-edit --ff-only <upstream>)" + (interactive) + (--if-let (magit-get-tracked-branch) + (magit-merge it '("--ff-only")) + (user-error "No upstream branch"))) + (defun km/magit-stage-file-intent (file) "Stage FILE but not its content. With a prefix argument or when there is no file at point ask for @@ -158,6 +166,8 @@ START-POINT set to the current branch. ?a "Push all" 'km/magit-push-all) (magit-define-popup-action 'magit-push-popup ?h "Push HEAD" 'km/magit-push-head) + (magit-define-popup-action 'magit-merge-popup + ?u "Merge upstream" 'km/magit-ff-merge-upstream) (magit-define-popup-action 'magit-log-popup ?a "All branches" 'km/magit-log-all-branches) (magit-define-popup-action 'magit-branch-popup |