Function: vc-git--git-path
vc-git--git-path is a byte-compiled function defined in vc-git.el.gz.
Signature
(vc-git--git-path &optional PATH)
Documentation
Resolve .git/PATH for the current working tree.
In particular, handle the case where this is a linked working tree, such that .git is a plain file.
See the --git-dir and --git-path options to git-rev-parse(1).
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-git.el.gz
(defun vc-git--git-path (&optional path)
"Resolve .git/PATH for the current working tree.
In particular, handle the case where this is a linked working
tree, such that .git is a plain file.
See the --git-dir and --git-path options to git-rev-parse(1)."
(if (and path (not (string-empty-p path)))
;; Canonicalize in this branch because --git-dir always returns
;; an absolute file name.
(expand-file-name
(string-trim-right
(vc-git--run-command-string nil "rev-parse"
"--git-path" path)))
(concat (string-trim-right
(vc-git--run-command-string nil "rev-parse" "--git-dir"))
"/")))