Philip Jackson <[email protected]> writes: > 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"))
Do we need to ask for a range, when we are looking for all refs ? I believe not, and would wrote: (defun magit-log-all () (magit-display-log () "--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: ") Does this fix the problem with magit-log listing all the possible refs before displaying the logs? May be we need both patch (may be with mine changed...) for it to work. I don't really have the time to look for it before Monday, so I'm just wondering. -- Rémi Vanicat
