Fix a potential failure to parse git config
Git has an obnoxious special case in git config, a line "foo" is the same as "foo = true". That means there is no way to examine the output of git config and tell if it was run with --null or not, since a "foo" in the first line could be such a boolean, or could be followed by its value on the next line if --null were used. So, rather than trying to do such a detection, track the style of config at all the points where it's generated.
This commit is contained in:
parent
fbd78cff64
commit
ca9c6c5f60
7 changed files with 31 additions and 32 deletions
|
@ -111,7 +111,7 @@ storeUUIDIn configfield = setConfig configfield . fromUUID
|
|||
setUUID :: Git.Repo -> UUID -> IO Git.Repo
|
||||
setUUID r u = do
|
||||
let s = encodeBS' $ show configkeyUUID ++ "=" ++ fromUUID u
|
||||
Git.Config.store s r
|
||||
Git.Config.store s Git.Config.ConfigList r
|
||||
|
||||
-- Dummy uuid for the whole web. Do not alter.
|
||||
webUUID :: UUID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue