Bind default-directory to given DIR.

Otherwise, "git config branch.<branch>.remote" would return the global
default "origin" instead of the actual, project-specific remote name.

* lisp/vc/vc-git.el (vc-git-dir-extra-headers): Bind default-directory
to given DIR.
This commit is contained in:
Tassilo Horn 2020-06-18 07:53:45 +02:00
parent 7c177ecb84
commit a4f1d681c1

View file

@ -735,6 +735,7 @@ or an empty string if none."
(with-current-buffer standard-output
(vc-git--out-ok "symbolic-ref" "HEAD"))))
(stash-list (vc-git-stash-list))
(default-directory dir)
branch remote remote-url stash-button stash-string)
(if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str)