summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-05-23 22:09:43 -0400
committerKyle Meyer <kyle@kyleam.com>2014-05-23 22:09:43 -0400
commit326aa231ebadfbb776f458a2d14ec7b9b3508b0a (patch)
tree34251338cb4d6807227ad47bb5d552b72ae8d2cb /lisp
parent1d93f8255ee80241d6cd2d6d66aaea534a525ef5 (diff)
downloademacs.d-326aa231ebadfbb776f458a2d14ec7b9b3508b0a.tar.gz
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').
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-git.el9
1 files changed, 7 insertions, 2 deletions
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)