---
A new version of my patch to show more log entries, with some idea from
the one of Óscar Fuentes, a keybinding, and documentation.
Another idea in the patch of Óscar is to wrote those keybinding in the
log buffer, this could easily be added to my patch.
magit.el | 19 +++++++++++++++++++
magit.texi | 5 +++++
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/magit.el b/magit.el
index 59430cd..e4724cd 100644
--- a/magit.el
+++ b/magit.el
@@ -1418,6 +1418,7 @@ FUNC should leave point at the end of the modified region"
(define-key map (kbd "E") 'magit-interactive-rebase)
(define-key map (kbd "V") 'magit-show-branches)
(define-key map (kbd "q") 'quit-window)
+ (define-key map (kbd "C-d") 'magit-log-show-more-entries)
map))
(easy-menu-define magit-mode-menu magit-mode-map
@@ -3210,6 +3211,24 @@ Prefix arg means justify as well."
(let ((res (magit-git-exit-code "log" "--decorate=full"
"--max-count=0")))
(setq magit-have-decorate (eq res 0)))))
+(defun magit-log-show-more-entries (&optional arg)
+ "Grow the number of log entries shown.
+
+With no prefix optional ARG, show twice as much log entries.
+With a numerical prefix ARG, add this number to the number of shown log
entries.
+With a non numeric prefix ARG, show all entries"
+ (interactive "P")
+ (make-local-variable 'magit-log-cutoff-length)
+ (cond
+ ((numberp arg)
+ (setq magit-log-cutoff-length (+ magit-log-cutoff-length added)))
+ (arg
+ (setq magit-log-cutoff-length magit-log-infinite-length))
+ (t (setq magit-log-cutoff-length (* magit-log-cutoff-length 2))))
+ (magit-refresh))
+
+
+
(defun magit-refresh-log-buffer (range style args)
(magit-configure-have-graph)
(magit-configure-have-decorate)
diff --git a/magit.texi b/magit.texi
index 3a399ca..cfe835c 100644
--- a/magit.texi
+++ b/magit.texi
@@ -330,6 +330,11 @@ in one branch, but not in another, for example.
Typing @kbd{L} (or @kbd{C-u L}) will show the log in a more verbose
form.
+Magit will show only @code{magit-log-cutoff-length} entries. @kbd{C-d}
+will show twice as much entries. @kbd{C-u C-d} will show all entries,
+and given a numeric prefix argument, @kbd{C-d} will add this number of
+entries.
+
You can move point to a commit and then cause various things to happen
with it. (The following commands work in any list of commit, such as
the one shown in the @emph{Unpushed commits} section.)
--
1.7.0.3
--
Rémi Vanicat
--
To unsubscribe, reply using "remove me" as the subject.