Function: magit-discard-hunk
magit-discard-hunk is a byte-compiled function defined in
magit-apply.el.
Signature
(magit-discard-hunk SECTION)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-apply.el
(defun magit-discard-hunk (section)
(magit-confirm 'discard "Discard hunk")
(let ((file (magit-section-parent-value section)))
(pcase (cddr (car (magit-file-status file)))
('(?U ?U) (magit-smerge-keep-current))
(_ (magit-discard-apply section #'magit-apply-hunk)))))