summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-07-09 23:39:08 -0400
committerKyle Meyer <kyle@kyleam.com>2016-07-09 23:39:08 -0400
commit0b28ec6964ee52a36779161f9d1437de80ef94c3 (patch)
tree21df32819057337b0fb20c948a078b5a3c685d2a
parentbe57e624fa279ee847e33372c4b333881d3a9e8f (diff)
downloademacs.d-0b28ec6964ee52a36779161f9d1437de80ef94c3.tar.gz
Add magit-log-modify-range command
-rw-r--r--init.el3
-rw-r--r--lisp/km-magit.el9
2 files changed, 12 insertions, 0 deletions
diff --git a/init.el b/init.el
index 1c865be..795a073 100644
--- a/init.el
+++ b/init.el
@@ -922,6 +922,9 @@
(magit-define-popup-action 'magit-log-popup
?e "Edit options" 'magit-log-refresh-popup)
+ (magit-define-popup-action 'magit-log-refresh-popup
+ ?m "Modify range" 'km/magit-log-modify-range)
+
(magit-change-popup-key 'magit-branch-popup :action
?c ?o)
(magit-change-popup-key 'magit-branch-popup :action
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index d4b89f2..4fed9c0 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -594,6 +594,15 @@ show tags by default."
((derived-mode-p 'magit-cherry-mode)
(call-interactively #'km/magit-cherry-flip-revs))))
+(defun km/magit-log-modify-range ()
+ "Change range for current log buffer."
+ (interactive)
+ (unless (derived-mode-p 'magit-log-mode)
+ (user-error "Not in log buffer"))
+ (setf (caar magit-refresh-args)
+ (read-string "Range: " (caar magit-refresh-args)))
+ (magit-refresh))
+
(defun km/magit-cherry-insert-in-upstream ()
(insert ?\n)
(magit-insert-section (cherries)