diff options
author | Joey Hess <joey@kitenet.net> | 2012-04-21 23:04:59 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-04-21 23:06:19 -0400 |
commit | bee420bd2d0cbe16489b061b208083e2b8ba9d0e (patch) | |
tree | 70ef95f81ee411513da4b6343720480cd941c42c /Annex/Branch.hs | |
parent | be36aaca5bccecdff7e48b020ee62b0db3bc38f1 (diff) |
in which I discover void
void :: Functor f => f a -> f () -- ah, of course that's useful :)
Diffstat (limited to 'Annex/Branch.hs')
-rw-r--r-- | Annex/Branch.hs | 9 |
1 files changed, 3 insertions, 6 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 () |