Function: magit-apply--ignore-whitespace-p
magit-apply--ignore-whitespace-p is a byte-compiled function defined
in magit-apply.el.
Signature
(magit-apply--ignore-whitespace-p SELECTION TYPE SCOPE)
Documentation
Return t if it is necessary and possible to ignore whitespace.
It is necessary to do so when the diff ignores whitespace changes and whole files are being applied. It is possible when no binary files are involved. If it is both necessary and impossible, then return nil, possibly causing whitespace changes to be applied.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-apply.el
(defun magit-apply--ignore-whitespace-p (selection type scope)
"Return t if it is necessary and possible to ignore whitespace.
It is necessary to do so when the diff ignores whitespace changes
and whole files are being applied. It is possible when no binary
files are involved. If it is both necessary and impossible, then
return nil, possibly causing whitespace changes to be applied."
(and (memq type '(unstaged staged))
(memq scope '(file files list))
(cl-find-if (lambda (arg)
(member arg '("--ignore-space-at-eol"
"--ignore-space-change"
"--ignore-all-space"
"--ignore-blank-lines")))
magit-buffer-diff-args)
(not (cl-find-if (##oref % binary)
(ensure-list selection)))))