Function: magit-with-blob

magit-with-blob is a macro defined in magit-git.el.

Signature

(magit-with-blob REV FILE &rest BODY)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-git.el
(defmacro magit-with-blob (rev file &rest body)
  (declare (indent 2)
           (debug (form form body)))
  `(magit--with-temp-process-buffer
     (let ((buffer-file-name ,file))
       (save-excursion
         (magit-git-insert "cat-file" "-p"
                           (concat ,rev ":" buffer-file-name)))
       (decode-coding-inserted-region
        (point-min) (point-max) buffer-file-name t nil nil t)
       ,@body)))