diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-11 00:39:50 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-11 00:41:19 -0400 |
commit | 9c77052ce05f449e0951b802a448e9e87756b91e (patch) | |
tree | 742b25437297483df8534bcc9d6f90259738393d /Annex | |
parent | 7be93ff4de1b3cb5fb072feb126e02042d58b44b (diff) |
random hlint (to give the autobuilder something new to build)
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Content.hs | 7 | ||||
-rw-r--r-- | Annex/Content/Direct.hs | 2 | ||||
-rw-r--r-- | Annex/Direct.hs | 2 | ||||
-rw-r--r-- | Annex/FileMatcher.hs | 2 | ||||
-rw-r--r-- | Annex/Init.hs | 11 | ||||
-rw-r--r-- | Annex/Ssh.hs | 2 |
6 files changed, 12 insertions, 14 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs index 6aef77830..464b98f05 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -243,10 +243,9 @@ finishGetViaTmp check key action = do moveAnnex key tmpfile logStatus key InfoPresent return True - , do - -- the tmp file is left behind, in case caller wants - -- to resume its transfer - return False + -- the tmp file is left behind, in case caller wants + -- to resume its transfer + , return False ) prepTmp :: Key -> Annex FilePath diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index b60ab9b1b..7a4fba455 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -66,7 +66,7 @@ changeAssociatedFiles key transform = do mapping <- calcRepo $ gitAnnexMapping key files <- associatedFilesRelative key let files' = transform files - when (files /= files') $ do + when (files /= files') $ modifyContent mapping $ liftIO $ viaTmp writeFileAnyEncoding mapping $ unlines files' diff --git a/Annex/Direct.hs b/Annex/Direct.hs index 340c5c475..495ce0d60 100644 --- a/Annex/Direct.hs +++ b/Annex/Direct.hs @@ -184,7 +184,7 @@ mergeDirectCleanup d oldsha newsha = do tryAnnex . maybe (araw f item) (\k -> void $ a k f) =<< catKey (getsha item) (getmode item) - moveout k f = removeDirect k f + moveout = removeDirect {- Files deleted by the merge are removed from the work tree. - Empty work tree directories are removed, per git behavior. -} diff --git a/Annex/FileMatcher.hs b/Annex/FileMatcher.hs index 158f3e787..f3f98fde6 100644 --- a/Annex/FileMatcher.hs +++ b/Annex/FileMatcher.hs @@ -43,7 +43,7 @@ checkMatcher matcher mkey afile notpresent def fileMatchInfo :: FilePath -> Annex MatchInfo fileMatchInfo file = do matchfile <- getTopFilePath <$> inRepo (toTopFilePath file) - return $ MatchingFile $ FileInfo + return $ MatchingFile FileInfo { matchFile = matchfile , relFile = file } diff --git a/Annex/Init.hs b/Annex/Init.hs index 616bda69b..43f24031c 100644 --- a/Annex/Init.hs +++ b/Annex/Init.hs @@ -70,11 +70,10 @@ initialize mdescription = do ( do enableDirectMode setDirect True - , do - -- Handle case where this repo was cloned from a - -- direct mode repo. - unlessM isBare - switchHEADBack + -- Handle case where this repo was cloned from a + -- direct mode repo + , unlessM isBare + switchHEADBack ) createInodeSentinalFile u <- getUUID @@ -227,7 +226,7 @@ fixBadBare = whenM checkBadBare $ do logStatus k InfoPresent let dotgit = d </> ".git" liftIO $ removeDirectoryRecursive dotgit - `catchIO` (const $ renameDirectory dotgit (d </> "removeme")) + `catchIO` const (renameDirectory dotgit (d </> "removeme")) {- A repostory with the problem won't know it's a bare repository, but will - have no pre-commit hook (which is not set up in a bare repository), diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index 8553ee797..aedf418f8 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -76,7 +76,7 @@ bestSocketPath abssocketfile = do -- ssh appends a 16 char extension to the socket when setting it -- up, which needs to be taken into account when checking -- that a valid socket was constructed. - sshgarbage = take (1+16) $ repeat 'X' + sshgarbage = replicate (1+16) 'X' sshConnectionCachingParams :: FilePath -> [CommandParam] sshConnectionCachingParams socketfile = |