Properly handle multiline git config values.

A crash on parsing was fixed a while ago. This adds support for fully
correctly parsing multiline git config values, using git config --null.

Since git-annex-shell configlist uses normal git config output, I left in
support for that too; the two forms of config output can be easily
identified by the parser. Since configlist only prints the annex.uuid
config, there's no risk of multiline values there, so no need to change it.
This commit is contained in:
Joey Hess 2011-12-15 12:46:04 -04:00
parent ef28b3fef7
commit 09cd042775
4 changed files with 14 additions and 5 deletions

View file

@ -111,7 +111,7 @@ tryGitConfigRead r
withTempFile "git-annex.tmp" $ \tmpfile h -> do
hPutStr h s
hClose h
pOpen ReadFromPipe "git" ["config", "--list", "--file", tmpfile] $
pOpen ReadFromPipe "git" ["config", "--null", "--list", "--file", tmpfile] $
Git.Config.hRead r
store a = do