Dmitry Gutov writes: > On 06/14/2016 08:03 PM, Phillip Lord wrote: > >>> AFAIK Emacs doesn't support GIT_DIR, see eg https://debbugs.gnu.org/5344 . > >> There's a patch attached that Bug report which never seems to have been >> applied. > > Have you tried it? Does it fix your problem? The following patch addresses this bug. John/Eli would you want this for Emacs-25. I've noticed from instrumenting vc-git that it's not just the symbolic-ref command that returns 128, but several others. So, it might be that the best long term solution would be to make change vc-git--call to set the default directory to the root, which would make GIT_DIR=.git always correct. At the moment, though, I've noticed some git commands are called with simple file names, and some full, so this would probably require more changes. No sense in making this sort of change for Emacs-25 now.