Reflog commands a bit more like the log commands now.
This commit is contained in:
parent
96f9a1e405
commit
80ee094c9c
2 changed files with 16 additions and 14 deletions
|
@ -22,10 +22,10 @@
|
|||
(actions
|
||||
("l" "Short" magit-display-log)
|
||||
("L" "Long" magit-log-long)
|
||||
("h" "Reflog" magit-reflog)
|
||||
("rl" "Ranged short" magit-display-log-ranged)
|
||||
("rL" "Ranged long" magit-log-long-ranged)
|
||||
("h" "Reflog" magit-reflog)
|
||||
("H" "Reflog on head" magit-reflog-head))
|
||||
("rh" "Ranged reflog" magit-reflog-ranged))
|
||||
(switches
|
||||
("-m" "Only merge commits" "--merges")
|
||||
("-f" "First parent" "--first-parent")
|
||||
|
|
26
magit.el
26
magit.el
|
@ -3854,19 +3854,21 @@ This is only non-nil in reflog buffers.")
|
|||
:lighter ()
|
||||
:keymap magit-reflog-mode-map)
|
||||
|
||||
(magit-define-command reflog (head)
|
||||
(interactive (list (magit-read-rev "Reflog of" (or (magit-guess-branch) "HEAD"))))
|
||||
(if head
|
||||
(let* ((topdir (magit-get-top-dir default-directory))
|
||||
(args (magit-rev-to-git head)))
|
||||
(switch-to-buffer "*magit-reflog*")
|
||||
(magit-mode-init topdir 'reflog
|
||||
#'magit-refresh-reflog-buffer head args)
|
||||
(magit-reflog-mode t))))
|
||||
|
||||
(magit-define-command reflog-head ()
|
||||
(magit-define-command reflog (&optional ask-for-range)
|
||||
(interactive)
|
||||
(magit-reflog "HEAD"))
|
||||
(let ((at (or (if ask-for-range
|
||||
(magit-read-rev "Reflog of" (or (magit-guess-branch) "HEAD")))
|
||||
"HEAD")))
|
||||
(let* ((topdir (magit-get-top-dir default-directory))
|
||||
(args (magit-rev-to-git at)))
|
||||
(switch-to-buffer "*magit-reflog*")
|
||||
(magit-mode-init topdir 'reflog
|
||||
#'magit-refresh-reflog-buffer at args)
|
||||
(magit-reflog-mode t)))))
|
||||
|
||||
(magit-define-command reflog-ranged ()
|
||||
(interactive)
|
||||
(magit-reflog t))
|
||||
|
||||
;;; Diffing
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue