At Fri, 14 May 2010 09:58:10 +0200,
Rémi Vanicat wrote:
> 
> It give magit the possibility to mimic gitx and gitk log view:
> just do C-u l --all RET RET
> ---
>  magit.el   |    4 +++-
>  magit.texi |    4 ++++
>  2 files changed, 7 insertions(+), 1 deletions(-)
> 
> This is a hack, there should be a better solution... But it works!

I was thinking more along the lines of the below. I think we should
implement Óscar's key binding idea too, did anyone start that work?

Cheers,
Phil

commit 0a9bf3005a38008eafe5d88100a0f1ffa970adeb
Author: Phil Jackson <[email protected]>
Date:   Fri May 14 11:57:07 2010 +0100

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

diff --git a/magit.el b/magit.el
index 2c90133..2d201cc 100644
--- a/magit.el
+++ b/magit.el
@@ -3499,18 +3499,26 @@ With a non numeric prefix ARG, show all entries"
 (defvar magit-log-grep-buffer-name "*magit-grep-log*"
   "Buffer name for display of log grep results")
 
-(defun magit-log (&optional arg)
-  (interactive "P")
-  (let* ((range (if arg
+(defun magit-display-log (ask-for-range &rest extra-args)
+  (let* ((log-range (if ask-for-range
                    (magit-read-rev-range "Log" "HEAD")
                  "HEAD"))
         (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)
-    (magit-mode-init topdir 'log #'magit-refresh-log-buffer range
+    (magit-mode-init topdir 'log #'magit-refresh-log-buffer log-range
                     "--pretty=oneline" args)
     (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)
   "Search for regexp specified by STR in the commit log."
   (interactive "sGrep in commit log: ")

Reply via email to