New function `magit-log-all' which provides --all functionality.

This commit is contained in:
Phil Jackson 2010-05-14 11:57:07 +01:00
parent 2a49110041
commit 0a9bf3005a

View file

@ -3499,18 +3499,26 @@ With a non numeric prefix ARG, show all entries"
(defvar magit-log-grep-buffer-name "*magit-grep-log*" (defvar magit-log-grep-buffer-name "*magit-grep-log*"
"Buffer name for display of log grep results") "Buffer name for display of log grep results")
(defun magit-log (&optional arg) (defun magit-display-log (ask-for-range &rest extra-args)
(interactive "P") (let* ((log-range (if ask-for-range
(let* ((range (if arg
(magit-read-rev-range "Log" "HEAD") (magit-read-rev-range "Log" "HEAD")
"HEAD")) "HEAD"))
(topdir (magit-get-top-dir default-directory)) (topdir (magit-get-top-dir default-directory))
(args (list (magit-rev-range-to-git range)))) (args (nconc (list (magit-rev-range-to-git log-range))
extra-args)))
(switch-to-buffer magit-log-buffer-name) (switch-to-buffer magit-log-buffer-name)
(magit-mode-init topdir 'log #'magit-refresh-log-buffer range (magit-mode-init topdir 'log #'magit-refresh-log-buffer log-range
"--pretty=oneline" args) "--pretty=oneline" args)
(magit-log-mode t))) (magit-log-mode t)))
(defun magit-log-all (&optional arg)
(interactive "P")
(magit-display-log arg "--all"))
(defun magit-log (&optional arg)
(interactive "P")
(magit-display-log arg))
(defun magit-log-grep (str) (defun magit-log-grep (str)
"Search for regexp specified by STR in the commit log." "Search for regexp specified by STR in the commit log."
(interactive "sGrep in commit log: ") (interactive "sGrep in commit log: ")