Function: vc-git-command
vc-git-command is a byte-compiled function defined in vc-git.el.gz.
Signature
(vc-git-command BUFFER OKSTATUS FILE-OR-LIST &rest FLAGS)
Documentation
A wrapper around vc-do-command for use in vc-git.el.
The difference to vc-do-command is that this function always invokes
vc-git-program.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-git.el.gz
;;; Internal commands
(defun vc-git-command (buffer okstatus file-or-list &rest flags)
"A wrapper around `vc-do-command' for use in vc-git.el.
The difference to vc-do-command is that this function always invokes
`vc-git-program'."
(let ((coding-system-for-read
(or coding-system-for-read vc-git-log-output-coding-system))
(coding-system-for-write
(or coding-system-for-write vc-git-commits-coding-system))
(process-environment
(append
`("GIT_DIR"
,@(when vc-git-use-literal-pathspecs
'("GIT_LITERAL_PATHSPECS=1"))
;; Avoid repository locking during background operations
;; (bug#21559).
,@(when revert-buffer-in-progress-p
'("GIT_OPTIONAL_LOCKS=0")))
process-environment)))
(apply #'vc-do-command (or buffer "*vc*") okstatus vc-git-program
;; https://debbugs.gnu.org/16897
(unless (vc-git--file-list-is-rootdir file-or-list)
file-or-list)
(cons "--no-pager" flags))))