hlint to give autobuilder something to do

This commit is contained in:
Joey Hess 2014-02-11 13:11:49 -04:00
parent 8108efbe9f
commit 556cfeb8f0
Failed to extract signature

View file

@ -86,7 +86,7 @@ seek rs = do
, [ mergeAnnex ] , [ mergeAnnex ]
] ]
whenM (Annex.getFlag $ optionName contentOption) $ whenM (Annex.getFlag $ optionName contentOption) $
whenM (seekSyncContent dataremotes) $ do whenM (seekSyncContent dataremotes) $
-- Transferring content can take a while, -- Transferring content can take a while,
-- and other changes can be pushed to the git-annex -- and other changes can be pushed to the git-annex
-- branch on the remotes in the meantime, so pull -- branch on the remotes in the meantime, so pull
@ -224,7 +224,7 @@ mergeRemote remote b = case b of
Just _ -> and <$> (mapM merge =<< tomerge (branchlist b)) Just _ -> and <$> (mapM merge =<< tomerge (branchlist b))
where where
merge = mergeFrom . remoteBranch remote merge = mergeFrom . remoteBranch remote
tomerge branches = filterM (changed remote) branches tomerge = filterM (changed remote)
branchlist Nothing = [] branchlist Nothing = []
branchlist (Just branch) = [branch, syncBranch branch] branchlist (Just branch) = [branch, syncBranch branch]
@ -452,7 +452,7 @@ resolveMerge' u
Just target -> do Just target -> do
unlessM (coreSymlinks <$> Annex.getGitConfig) $ unlessM (coreSymlinks <$> Annex.getGitConfig) $
addAnnexLink target f addAnnexLink target f
maybe noop (flip toDirect f) maybe noop (`toDirect` f)
(fileKey (takeFileName target)) (fileKey (takeFileName target))
{- git-merge moves conflicting files away to files {- git-merge moves conflicting files away to files
@ -535,7 +535,7 @@ newer remote b = do
-} -}
seekSyncContent :: [Remote] -> Annex Bool seekSyncContent :: [Remote] -> Annex Bool
seekSyncContent rs = do seekSyncContent rs = do
mvar <- liftIO $ newEmptyMVar mvar <- liftIO newEmptyMVar
mapM_ (go mvar) =<< seekHelper LsFiles.inRepo [] mapM_ (go mvar) =<< seekHelper LsFiles.inRepo []
liftIO $ not <$> isEmptyMVar mvar liftIO $ not <$> isEmptyMVar mvar
where where
@ -552,7 +552,7 @@ syncFile rs f (k, _) = do
putrs <- catMaybes . snd . unzip <$> (sequence =<< handleput lack) putrs <- catMaybes . snd . unzip <$> (sequence =<< handleput lack)
u <- getUUID u <- getUUID
let locs' = concat [if got then [u] else [], putrs, locs] let locs' = concat [[u | got], putrs, locs]
-- Using callCommandAction rather than commandAction for drops, -- Using callCommandAction rather than commandAction for drops,
-- because a failure to drop does not mean the sync failed. -- because a failure to drop does not mean the sync failed.
@ -576,7 +576,7 @@ syncFile rs f (k, _) = do
| Remote.readonly r || remoteAnnexReadOnly (Types.Remote.gitconfig r) = return False | Remote.readonly r || remoteAnnexReadOnly (Types.Remote.gitconfig r) = return False
| otherwise = wantSend True (Just k) (Just f) (Remote.uuid r) | otherwise = wantSend True (Just k) (Just f) (Remote.uuid r)
handleput lack = ifM (inAnnex k) handleput lack = ifM (inAnnex k)
( map put <$> (filterM wantput lack) ( map put <$> filterM wantput lack
, return [] , return []
) )
put dest = do put dest = do