aboutsummaryrefslogtreecommitdiff
path: root/Git/UpdateIndex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-10 19:58:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-10 19:58:34 -0400
commitca9ee21bd771e7f94ecd3916f55b10fb3cc8dcbe (patch)
tree433fe04a4786139e0ff044e6921224d2f63d91c6 /Git/UpdateIndex.hs
parentc1b432ee54424c3943dee97ff2dd90c4cc533e9b (diff)
crazy optimisation
Crazy like a fox..
Diffstat (limited to 'Git/UpdateIndex.hs')
-rw-r--r--Git/UpdateIndex.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Git/UpdateIndex.hs b/Git/UpdateIndex.hs
index 07057ed98..31e8a45b2 100644
--- a/Git/UpdateIndex.hs
+++ b/Git/UpdateIndex.hs
@@ -24,7 +24,6 @@ import Git
import Git.Types
import Git.Command
import Git.FilePath
-import Git.HashObject
import Git.Sha
{- Streamers are passed a callback and should feed it lines in the form
@@ -70,10 +69,10 @@ unstageFile file repo = do
return $ pureStreamer $ "0 " ++ show nullSha ++ "\t" ++ getTopFilePath p
{- A streamer that adds a symlink to the index. -}
-stageSymlink :: FilePath -> String -> Repo -> IO Streamer
-stageSymlink file linktext repo = do
+stageSymlink :: FilePath -> Sha -> Repo -> IO Streamer
+stageSymlink file sha repo = do
line <- updateIndexLine
- <$> hashObject BlobObject linktext repo
+ <$> pure sha
<*> pure SymlinkBlob
<*> toTopFilePath file repo
return $ pureStreamer line