fix build with old base
authorJoey Hess <joeyh@joeyh.name>
Mon, 30 Sep 2024 15:02:08 +0000 (11:02 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 30 Sep 2024 15:02:08 +0000 (11:02 -0400)
i386ancient has a base too old for NE.singleton

Git/Config.hs
Remote/Git.hs

index 6c24c04dc315417d7187466927f23b2db081389d..82edf690026684568d3a4d37f1fb4863592fcf92 100644 (file)
@@ -141,7 +141,7 @@ storeParsed c repo = updateLocation $ repo
 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)
        }
 
@@ -205,7 +205,7 @@ parse s st
        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 
index 25e2d62c4cd2562e440c40f4fb5ab29f874e1d92..7a3b9fcea1e7321c314131ac8223a1647d599f7b 100644 (file)
@@ -953,11 +953,13 @@ listProxied proxies rs = concat <$> mapM go rs
                                , 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
@@ -985,7 +987,7 @@ listProxied proxies rs = concat <$> mapM go rs
 
                addremoteannexfield f = M.insert
                        (mkRemoteConfigKey renamedr (remoteGitConfigKey f)) 
-                       . NE.singleton
+                       . (\v -> v NE.:| [])
 
                inheritconfigs c = foldl' inheritconfig c proxyInheritedFields