Revert "pass --git-dir, rather than changing cwd"

This reverts commit c142696c58.

It turns out it was not needed; 681313dfd4
fixed up the git dir, so setting cwd to it works ok.

But worst, this commit broke the test suite massively. I don't understand how.
git-annex get was failing. Very weirdly, git-annex find in a fresh
clone of an annex repo, during autoinit, was displaying a side message
-- but side messages are disabled when running find.
This commit is contained in:
Joey Hess 2020-10-23 15:51:38 -04:00
parent a108b00b33
commit f167851628
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -61,15 +61,10 @@ read' repo = go repo
go _ = assertLocal repo $ error "internal"
git_config d = withCreateProcess p (git_config' p)
where
params =
[ "--git-dir"
, fromRawFilePath d
, "config"
, "--null"
, "--list"
]
params = ["config", "--null", "--list"]
p = (proc "git" params)
{ env = gitEnv repo
{ cwd = Just (fromRawFilePath d)
, env = gitEnv repo
, std_out = CreatePipe
}
git_config' p _ (Just hout) _ pid =