diff --git a/Data/Git/Parser.hs b/Data/Git/Parser.hs index 46581b90e20c08d8b11951aa3c913903302a4d24..f57b9cf63046d225f51075002825837e5e1991eb 100644 --- a/Data/Git/Parser.hs +++ b/Data/Git/Parser.hs @@ -91,7 +91,7 @@ eitherParseChunks p (i:is) = loop (P.parse p i) is loop (P.ParseOK _ a) [] = Right a loop (P.ParseMore c) [] = toEither $ c Nothing loop (P.ParseMore c) (x:xs) = loop (c $ Just x) xs - loop ps l = Left ("eitherParseChunk: error: " <> show ps <> " : " <> show (i:is)) + loop ps l = Left ("eitherParseChunk: error: " <> show ps <> " : " <> show l) toEither (P.ParseOK _ a) = Right a toEither (P.ParseFail e) = Left e diff --git a/Data/Git/Storage/Object.hs b/Data/Git/Storage/Object.hs index d5746f517a3d43fe1d51d31c9650c3a6bab2ecc1..564d4304e4d5d0d9ca329275d83b9f715a0a0914 100644 --- a/Data/Git/Storage/Object.hs +++ b/Data/Git/Storage/Object.hs @@ -171,7 +171,7 @@ treeParse = Tree <$> parseEnts parseEntName = entName <$> (P.skipASCII ' ' >> P.takeWhile (/= 0)) -- | parse a blob content -blobParse = (Blob . L.fromStrict <$> P.takeAll) +blobParse = (Blob . L.fromChunks . (:[]) <$> P.takeAll) -- | parse a commit content commitParse = do diff --git a/git.cabal b/git.cabal index e97877eb6624f674260417998f9e5127e14b71e8..a330f0328d7ac29e36b40972de5cb018617b28fd 100644 --- a/git.cabal +++ b/git.cabal @@ -75,7 +75,8 @@ Library Data.Git.Path Data.Git.Parser Data.Git.WorkTree - ghc-options: -Wall -fno-warn-missing-signatures + ghc-options: -Wall -fno-warn-unused-imports -fno-warn-missing-signatures + Test-Suite test-unit type: exitcode-stdio-1.0