Function: vc-git--with-apply-temp
vc-git--with-apply-temp is a macro defined in vc-git.el.gz.
Signature
(vc-git--with-apply-temp (TEMP &optional BUFFER OKSTATUS &rest ARGS) &body BODY)
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-git.el.gz
(cl-defmacro vc-git--with-apply-temp
((temp &optional buffer okstatus &rest args) &body body)
(declare (indent 1))
`(let ((,temp (make-nearby-temp-file ,(format "git-%s" temp))))
(unwind-protect (progn ,@body
;; This uses `file-local-name' to strip the
;; TRAMP prefix, not `file-relative-name',
;; because we've had at least one problem
;; report where relativizing the file name
;; meant that Git failed to find it.
(vc-git-command ,buffer ,(or okstatus 0)
nil "apply"
,@(or args '("--cached"))
(file-local-name ,temp)))
(delete-file ,temp))))