pass --git-dir, rather than changing cwd
authorJoey Hess <joeyh@joeyh.name>
Fri, 23 Oct 2020 17:36:56 +0000 (13:36 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 23 Oct 2020 17:36:56 +0000 (13:36 -0400)
commitc142696c587100b195accec4e9bfaa26cde73d48
tree18399ea078b9444b500594ada39230576ff07b57
parent966dbb518ee52aeb138a568e8cf098b075a837d6
pass --git-dir, rather than changing cwd

If .git is a gitlink file, setting cwd to it will fail, but --git-dir
will succeed. And this is the only place where it sets cwd when running
git, everywhere else already uses --git-dir.

Note that, git-annex's submodule fixup code usually converts gitlink
files to symlinks, so this wasn't usually problem. Still, worth fixing.

This commit was sponsored by Svenne Krap on Patreon.
Git/Config.hs