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
|
@ -96,7 +96,7 @@ gitAnnexGlobalOptions = commonGlobalOptions ++
|
|||
setgitconfig v = Annex.adjustGitRepo $ \r ->
|
||||
if Param v `elem` gitGlobalOpts r
|
||||
then return r
|
||||
else Git.Config.store (encodeBS' v) $
|
||||
else Git.Config.store (encodeBS' v) Git.Config.ConfigList $
|
||||
r { gitGlobalOpts = gitGlobalOpts r ++ [Param "-c", Param v] }
|
||||
setdesktopnotify v = Annex.changeState $ \s -> s { Annex.desktopnotify = Annex.desktopnotify s <> v }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue