Skip to content

Commit

Permalink
blob: cleanup, remove build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kfish committed May 11, 2011
1 parent 101c18a commit 7b35b60
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Git/Blob.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ module Git.Blob (
import Codec.Compression.Zlib
import Control.Applicative ((<$>))
import Control.Monad
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.Lazy.Char8 as C
import Data.Maybe (listToMaybe)

-- show-prefix, show-root use these
import System.FilePath
import System.Posix.Files
import System.IO

import Git.Commit
import Git.Pack
Expand All @@ -33,12 +31,10 @@ readBlob blob = do
path <- gitPath ("objects" </> bH </> bT)
exists <- fileExist path
if exists
then do
Just . decompress <$> C.readFile path
then Just . decompress <$> C.readFile path
else do
let sha = readDigestBS blob
m'po <- findInPackIdxs sha
return $ fmap (packObjectPretty sha) m'po
fmap (packObjectPretty sha) <$> findInPackIdxs sha

prettyBlob :: String -> C.ByteString -> C.ByteString
prettyBlob blob bs
Expand Down

0 comments on commit 7b35b60

Please sign in to comment.