summaryrefslogtreecommitdiff
path: root/Git.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-29 19:19:28 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-29 19:19:28 -0400
commit67f2b7cb3eba19eb1ee55585f497e35172971e1a (patch)
tree557f51b551228529d1f34ddecbd9377547a2eee6 /Git.hs
parenta91c8a15d523791ea729976cd5c76bac1e7ec135 (diff)
use ByteStrings when reading content of files
didn't bother to benchmark this
Diffstat (limited to 'Git.hs')
-rw-r--r--Git.hs13
1 files changed, 0 insertions, 13 deletions
diff --git a/Git.hs b/Git.hs
index f49cc21b5..4c4f00e8d 100644
--- a/Git.hs
+++ b/Git.hs
@@ -55,7 +55,6 @@ module Git (
repoAbsPath,
reap,
useIndex,
- hashObject,
getSha,
shaSize,
commit,
@@ -417,18 +416,6 @@ useIndex index = do
reset (Right (Just v)) = setEnv var v True
reset _ = unsetEnv var
-{- Injects some content into git, returning its hash. -}
-hashObject :: Repo -> String -> IO String
-hashObject repo content = getSha subcmd $ do
- (h, s) <- pipeWriteRead repo (map Param params) content
- length s `seq` do
- forceSuccess h
- reap -- XXX unsure why this is needed
- return s
- where
- subcmd = "hash-object"
- params = [subcmd, "-w", "--stdin"]
-
{- Runs an action that causes a git subcommand to emit a sha, and strips
any trailing newline, returning the sha. -}
getSha :: String -> IO String -> IO String