Function: majutsu-diff-wash-diffs

majutsu-diff-wash-diffs is a natively compiled function defined in majutsu-diff.el.

Signature

(majutsu-diff-wash-diffs ARGS)

Documentation

Parse a jj diff already inserted into the current buffer.

Assumes point is at the start of the diff output.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-diff.el
(defun majutsu-diff-wash-diffs (args)
  "Parse a jj diff already inserted into the current buffer.
Assumes point is at the start of the diff output."
  (goto-char (point-min))
  (when (member "--stat" args)
    (majutsu-diff-wash-diffstat))
  (goto-char (point-min))
  (when (re-search-forward "^diff --git " nil t)
    (goto-char (match-beginning 0)))
  (when (looking-at "^diff --git ")
    (while (and (not (eobp))
                (looking-at "^diff --git "))
      (let ((before (point)))
        (majutsu-diff-wash-file)
        ;; A malformed or future Git header must never trap refresh in a
        ;; non-advancing parser loop.
        (when (= before (point))
          (forward-line 1))))
    (unless (bolp) (insert "\n"))))