let's use words and unwords rather than split and intercalate " "
authorJoey Hess <joey@kitenet.net>
Sat, 30 Mar 2013 22:55:22 +0000 (18:55 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 30 Mar 2013 22:56:01 +0000 (18:56 -0400)
Command/RecvKey.hs
Command/SendKey.hs
GitAnnexShell.hs

index c1c11a550ee11823b578820bf5e255e1a8068d7f..a1c6093e84219d87db1b8bd5c29783d3c0effcdb 100644 (file)
@@ -45,7 +45,7 @@ start key = ifM (inAnnex key)
   where
        go tmp = do
                (opts,_,_) <- getOpt Permute rsyncSafeOptions <$>
-                               maybe [] (split " ") <$> getField "RsyncOptions"
+                               maybe [] words <$> getField "RsyncOptions"
                ifM (liftIO $ rsyncServerReceive (map Param opts) tmp)
                        ( ifM (isJust <$> Fields.getField Fields.direct)
                                ( directcheck tmp
index 42a0377a33cd3d88b1222abeadf9bccd3638dd0c..d0e89aef97fbbee22bd49ef24d889ab6fb6e0d3f 100644 (file)
@@ -28,7 +28,7 @@ seek = [withKeys start]
 start :: Key -> CommandStart
 start key = do
        (opts,_,_) <- getOpt Permute rsyncSafeOptions <$>
-                       maybe [] (split " ") <$> getField "RsyncOptions"
+                       maybe [] words <$> getField "RsyncOptions"
        ifM (inAnnex key)
                ( fieldTransfer Upload key $ \_p ->
                        sendAnnex key rollback $ liftIO . rsyncServerSend (map Param opts)
index 61923c373bc43e8c63b1d0e841cad3890de319e9..31912ebbedb9bd40f707629a18e17b5066a23b96 100644 (file)
@@ -89,7 +89,7 @@ builtin cmd dir params = do
        checkDirectory $ Just dir
        let (params', fieldparams, opts) = partitionParams params
            fields = filter checkField $ parseFields fieldparams
-           cmds' = map (newcmd $ intercalate " " opts) cmds
+           cmds' = map (newcmd $ unwords opts) cmds
        dispatch False (cmd : params') cmds' options fields header $
                Git.Construct.repoAbsPath dir >>= Git.Construct.fromAbsPath
   where