diff options
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Branch.hs | 9 | ||||
-rw-r--r-- | Annex/Ssh.hs | 11 |
2 files changed, 7 insertions, 13 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs index e5976c2c0..ce1dd58ce 100644 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -65,9 +65,7 @@ siblingBranches = inRepo $ Git.Ref.matchingUniq name {- Creates the branch, if it does not already exist. -} create :: Annex () -create = do - _ <- getBranch - return () +create = void $ getBranch {- Returns the ref of the branch, creating it first if necessary. -} getBranch :: Annex Git.Ref @@ -325,10 +323,9 @@ setUnCommitted = do liftIO $ writeFile file "1" setCommitted :: Annex () -setCommitted = do +setCommitted = void $ do file <- fromRepo gitAnnexIndexDirty - _ <- liftIO $ tryIO $ removeFile file - return () + liftIO $ tryIO $ removeFile file {- Stages the journal into the index. -} stageJournal :: Annex () diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index c9e6e2951..02a1ee705 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -87,20 +87,17 @@ sshCleanup = do stopssh socketfile = do let (host, port) = socket2hostport socketfile (_, params) <- sshInfo (host, port) - _ <- liftIO $ do + void $ liftIO $ do -- "ssh -O stop" is noisy on stderr even with -q let cmd = unwords $ toCommand $ [ Params "-O stop" ] ++ params ++ [Param host] - _ <- boolSystem "sh" + boolSystem "sh" [ Param "-c" , Param $ "ssh " ++ cmd ++ " >/dev/null 2>/dev/null" ] - --try $ removeFile socketfile - return () - -- Cannot remove the lock file; other processes may - -- be waiting on our exclusive lock to use it. - return () + -- Cannot remove the lock file; other processes may + -- be waiting on our exclusive lock to use it. hostport2socket :: String -> Maybe Integer -> FilePath hostport2socket host Nothing = host |