From: Joey Hess Date: Fri, 23 Oct 2020 19:51:38 +0000 (-0400) Subject: Revert "pass --git-dir, rather than changing cwd" X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~106^2~38 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f167851628d1fa101ad7b64beb2b02106f0d42b9;p=git-annex.git Revert "pass --git-dir, rather than changing cwd" This reverts commit c142696c587100b195accec4e9bfaa26cde73d48. It turns out it was not needed; 681313dfd4e840e6366f3c39eddd92f65d764188 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. --- diff --git a/Git/Config.hs b/Git/Config.hs index db1bc3c19b..45cf4aa8fb 100644 --- a/Git/Config.hs +++ b/Git/Config.hs @@ -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 =