From 326aa231ebadfbb776f458a2d14ec7b9b3508b0a Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 23 May 2014 22:09:43 -0400 Subject: magit: Add action for log of all branches Remove '-all' flag from default log switches so that 'll' has the default behavior (log of current branch). Now 'la' shows the log for all branches (instead of 'l-A' or 'l A'). --- lisp/init-git.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/init-git.el b/lisp/init-git.el index 8023a3c..9ed94ad 100644 --- a/lisp/init-git.el +++ b/lisp/init-git.el @@ -28,12 +28,17 @@ Useful for non-source code repos (e.g., Org mode note files)." (let ((remote (magit-read-remote "Remote"))) (magit-run-git-async "push" "-v" remote "--all"))) +(defun km/magit-log-all-branches (range &optional args) + (interactive (magit-log-read-args t nil)) + (add-to-list 'args "--all") + (magit-log-dwim range args)) + (magit-define-popup-action 'magit-commit-popup ?u "Auto commit" 'km/magit-auto-commit) (magit-define-popup-action 'magit-push-popup ?a "Push all" 'km/magit-push-all) - -(add-to-list 'magit-log-popup-defaults "--all") +(magit-define-popup-action 'magit-log-popup + ?a "All branches" 'km/magit-log-all-branches) (diminish 'magit-auto-revert-mode) -- cgit v1.2.3