From 70ede6c2bc7ad32aeee391a8f1e74694f9f325d8 Mon Sep 17 00:00:00 2001
From: Vincent Hanquez <vincent@snarc.org>
Date: Sun, 22 May 2016 16:39:46 +0100
Subject: [PATCH] small fixes and ignore useless warnings

---
 Data/Git/Parser.hs         | 2 +-
 Data/Git/Storage/Object.hs | 2 +-
 git.cabal                  | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Data/Git/Parser.hs b/Data/Git/Parser.hs
index 46581b9..f57b9cf 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 d5746f5..564d430 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 e97877e..a330f03 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
-- 
GitLab