add magit-diff-master-mergebase command
Stefan Bund [Tue, 7 Mar 2017 12:25:51 +0000 (13:25 +0100)]
setup/magit.el

index 62846ee..a886155 100644 (file)
   (interactive "P")
   (quit-window kill-buffer))
 
+(defun magit-diff-master-mergebase (&optional args files)
+  (interactive (magit-diff-arguments))
+  (magit-diff-working-tree
+   (magit-git-string "merge-base" "master" "HEAD") args files))
+
+(magit-define-popup-action 'magit-diff-popup
+  ?m "Diff merge-base master" 'magit-diff-master-mergebase)
+
 ; ignore whitespace
 ; (setq magit-diff-options '("-w"))