summaryrefslogtreecommitdiff
path: root/Git/CatFile.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-14 15:30:14 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-14 15:43:13 -0400
commit02f1bd2bf47d3ff49a222e9428ec27708ef55f64 (patch)
tree456548530c65850a829a1a85609070bc111de1b9 /Git/CatFile.hs
parent2b24e16a633575703a43e1fb991f34b290a1d7e4 (diff)
split more stuff out of Git.hs
Diffstat (limited to 'Git/CatFile.hs')
-rw-r--r--Git/CatFile.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Git/CatFile.hs b/Git/CatFile.hs
index c1cafb8ba..44c2a9f5e 100644
--- a/Git/CatFile.hs
+++ b/Git/CatFile.hs
@@ -20,6 +20,7 @@ import qualified Data.ByteString.Char8 as S
import qualified Data.ByteString.Lazy.Char8 as L
import Git
+import Git.Sha
import Utility.SafeCommand
type CatFileHandle = (PipeHandle, Handle, Handle)
@@ -27,7 +28,7 @@ type CatFileHandle = (PipeHandle, Handle, Handle)
{- Starts git cat-file running in batch mode in a repo and returns a handle. -}
catFileStart :: Repo -> IO CatFileHandle
catFileStart repo = hPipeBoth "git" $ toCommand $
- Git.gitCommandLine [Param "cat-file", Param "--batch"] repo
+ gitCommandLine [Param "cat-file", Param "--batch"] repo
{- Stops git cat-file. -}
catFileStop :: CatFileHandle -> IO ()
@@ -49,7 +50,7 @@ catObject (_, from, to) object = do
header <- hGetLine from
case words header of
[sha, objtype, size]
- | length sha == Git.shaSize &&
+ | length sha == shaSize &&
validobjtype objtype -> handle size
| otherwise -> empty
_