Function: magit-log-set-commit-limit

magit-log-set-commit-limit is a byte-compiled function defined in magit-log.el.

Signature

(magit-log-set-commit-limit FN)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-log.el
(defun magit-log-set-commit-limit (fn)
  (let* ((val magit-buffer-log-args)
         (arg (seq-find (##string-match "^-n\\([0-9]+\\)?$" %) val))
         (num (and arg (string-to-number (match-str 1 arg))))
         (num (if num (funcall fn num 2) 256)))
    (setq val (remove arg val))
    (setq magit-buffer-log-args
          (if (and num (> num 0))
              (cons (format "-n%d" num) val)
            val)))
  (magit-refresh))