diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-11 01:52:58 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-11 01:52:58 -0400 |
commit | 637b5feb45013f69f3aacbafeb796de666d3faa3 (patch) | |
tree | 17e5506c3715be46318d15dd76ec474641faffe2 /Annex | |
parent | b327227ba596d4fc5012138d03390c3eb861b808 (diff) |
lint
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Branch.hs | 8 | ||||
-rw-r--r-- | Annex/CatFile.hs | 2 | ||||
-rw-r--r-- | Annex/Content.hs | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs index 6c28a0c84..05c89ed97 100644 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -63,7 +63,7 @@ withIndex :: Annex a -> Annex a withIndex = withIndex' False withIndex' :: Bool -> Annex a -> Annex a withIndex' bootstrapping a = do - f <- fromRepo $ index + f <- fromRepo index bracketIO (Git.useIndex f) id $ do unlessM (liftIO $ doesFileExist f) $ do unless bootstrapping create @@ -336,8 +336,8 @@ stageJournalFiles = do where index_lines shas = map genline . zip shas genline (sha, file) = Git.UnionMerge.update_index_line sha file - git_hash_object g = Git.gitCommandLine - [Param "hash-object", Param "-w", Param "--stdin-paths"] g + git_hash_object = Git.gitCommandLine + [Param "hash-object", Param "-w", Param "--stdin-paths"] {- Checks if there are changes in the journal. -} @@ -366,7 +366,7 @@ fileJournal = replace "//" "_" . replace "_" "/" - contention with other git-annex processes. -} lockJournal :: Annex a -> Annex a lockJournal a = do - file <- fromRepo $ gitAnnexJournalLock + file <- fromRepo gitAnnexJournalLock bracketIO (lock file) unlock a where lock file = do diff --git a/Annex/CatFile.hs b/Annex/CatFile.hs index a043e1ae3..99cc519f5 100644 --- a/Annex/CatFile.hs +++ b/Annex/CatFile.hs @@ -17,7 +17,7 @@ catFile :: String -> FilePath -> Annex String catFile branch file = maybe startup go =<< Annex.getState Annex.catfilehandle where startup = do - h <- inRepo $ Git.CatFile.catFileStart + h <- inRepo Git.CatFile.catFileStart Annex.changeState $ \s -> s { Annex.catfilehandle = Just h } go h go h = liftIO $ Git.CatFile.catFile h branch file diff --git a/Annex/Content.hs b/Annex/Content.hs index 7586bb96f..83839ea13 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -91,7 +91,7 @@ openForLock file writelock = bracket_ prep cleanup go - have to fiddle with permissions to open for an - exclusive lock. -} forwritelock a = - when writelock $ whenM (doesFileExist file) $ a + when writelock $ whenM (doesFileExist file) a prep = forwritelock $ allowWrite file cleanup = forwritelock $ preventWrite file @@ -251,7 +251,7 @@ fromAnnex key dest = withObjectLoc key $ \(dir, file) -> liftIO $ do moveBad :: Key -> Annex FilePath moveBad key = do src <- fromRepo $ gitAnnexLocation key - bad <- fromRepo $ gitAnnexBadDir + bad <- fromRepo gitAnnexBadDir let dest = bad </> takeFileName src liftIO $ do createDirectoryIfMissing True (parentDir dest) |