Function: magit-apply-hunks
magit-apply-hunks is a byte-compiled function defined in
magit-apply.el.
Signature
(magit-apply-hunks HUNKS &rest ARGS)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-apply.el
(defun magit-apply-hunks (hunks &rest args)
(let ((file (oref (car hunks) parent)))
(when (magit-diff--combined-p file)
(user-error "Cannot un-/stage resolution hunks. Stage the whole file"))
(magit-apply-patch
file args
(concat (oref file header)
(string-join (magit-apply--adjust-hunk-new-starts
(mapcar #'magit-apply--section-content hunks)))))))