diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-22 14:52:17 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-22 14:52:17 -0400 |
commit | de5fdb11a238249c1b9b89a29277777a09f1cdb9 (patch) | |
tree | b110f32aafa4ce18fb225d9135432ae8be1c69a9 /Git | |
parent | b9186e3c2097cf8c94403b38c9dbe6ed382d82b0 (diff) |
clean warnings
Diffstat (limited to 'Git')
-rw-r--r-- | Git/RecoverRepository.hs | 16 | ||||
-rw-r--r-- | Git/RefLog.hs | 1 |
2 files changed, 8 insertions, 9 deletions
diff --git a/Git/RecoverRepository.hs b/Git/RecoverRepository.hs index a109896e7..0563c636b 100644 --- a/Git/RecoverRepository.hs +++ b/Git/RecoverRepository.hs @@ -228,7 +228,7 @@ getAllRefs :: Repo -> IO [Ref] getAllRefs r = do packedrs <- mapMaybe parsePacked . lines <$> catchDefaultIO "" (readFile $ packedRefsFile r) - loosers <- map toref <$> dirContentsRecursive (localGitDir r </> "refs") + loosers <- map toref <$> dirContentsRecursive refdir return $ packedrs ++ loosers where refdir = localGitDir r </> "refs" @@ -335,9 +335,9 @@ verifyCommit missing goodcommits commit r <*> extractSha treesha _ -> Nothing check [] = return True - check ((commit, tree):rest) - | checkGoodCommit commit goodcommits = return True - | otherwise = verifyTree missing tree r <&&> check rest + check ((c, t):rest) + | checkGoodCommit c goodcommits = return True + | otherwise = verifyTree missing t r <&&> check rest {- Verifies that a tree is good, including all trees and blobs - referenced by it. -} @@ -361,13 +361,13 @@ rewriteIndex missing r | repoIsLocalBare r = return [] | otherwise = do (indexcontents, cleanup) <- LsFiles.stagedDetails [Git.repoPath r] r - let (missing, present) = partition ismissing indexcontents - unless (null missing) $ do + let (bad, good) = partition ismissing indexcontents + unless (null bad) $ do nukeFile (localGitDir r </> "index") UpdateIndex.streamUpdateIndex r - =<< (catMaybes <$> mapM reinject present) + =<< (catMaybes <$> mapM reinject good) void cleanup - return $ map fst3 missing + return $ map fst3 bad where getblob (_file, Just sha, Just _mode) = Just sha getblob _ = Nothing diff --git a/Git/RefLog.hs b/Git/RefLog.hs index 7502f14b3..3f41e8eaa 100644 --- a/Git/RefLog.hs +++ b/Git/RefLog.hs @@ -11,7 +11,6 @@ import Common import Git import Git.Command import Git.Sha -import Git.CatFile {- Gets the reflog for a given branch. -} get :: Branch -> Repo -> IO [Sha] |