From: Tassilo Horn Date: Thu, 18 Jun 2020 05:53:45 +0000 (+0200) Subject: Bind default-directory to given DIR. X-Git-Tag: emacs-28.0.90~7154 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a4f1d681c10e39429d4ba6d9ca42b009a7b003fb;p=emacs.git Bind default-directory to given DIR. Otherwise, "git config 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. --- diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 1cd2a7bb133..b5cb842aeee 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -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)