]> git.eshelyaron.com Git - emacs.git/commitdiff
Bind default-directory to given DIR.
authorTassilo Horn <tsdh@gnu.org>
Thu, 18 Jun 2020 05:53:45 +0000 (07:53 +0200)
committerTassilo Horn <tsdh@gnu.org>
Thu, 18 Jun 2020 05:55:38 +0000 (07:55 +0200)
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.

lisp/vc/vc-git.el

index 1cd2a7bb1338cc8763c3aac6edd2f11b5c20f380..b5cb842aeeec63e53799ce5e003038066acd2a93 100644 (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)