store' :: ConfigKey -> ConfigValue -> Repo -> Repo
store' k v repo = repo
{ config = M.singleton k v `M.union` config repo
- , fullconfig = M.unionWith (<>) (M.singleton k (NE.singleton v))
+ , fullconfig = M.unionWith (<>) (M.singleton k (v NE.:| []))
(fullconfig repo)
}
eq = fromIntegral (ord '=')
sep c = M.fromListWith (<>)
- . map (\(k,v) -> (ConfigKey k, (NE.singleton (mkval v))) )
+ . map (\(k,v) -> (ConfigKey k, mkval v NE.:| []))
. map (S.break (== c))
mkval v
, Git.fullconfig = c
}
- adduuid ck = M.insert ck $ NE.singleton $
- Git.ConfigValue $ fromUUID $ proxyRemoteUUID p
+ adduuid ck = M.insert ck $
+ (Git.ConfigValue $ fromUUID $ proxyRemoteUUID p)
+ NE.:| []
addurl = M.insert (mkRemoteConfigKey renamedr (remoteGitConfigKey UrlField)) $
- NE.singleton $ Git.ConfigValue $ encodeBS $ Git.repoLocation r
+ (Git.ConfigValue $ encodeBS $ Git.repoLocation r)
+ NE.:| []
addproxiedby = case remoteAnnexUUID gc of
Just u -> addremoteannexfield ProxiedByField
addremoteannexfield f = M.insert
(mkRemoteConfigKey renamedr (remoteGitConfigKey f))
- . NE.singleton
+ . (\v -> v NE.:| [])
inheritconfigs c = foldl' inheritconfig c proxyInheritedFields