diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-24 20:50:39 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-24 20:50:39 -0400 |
commit | c9b3b8829dc3f106583fb933808179ec02773790 (patch) | |
tree | d2b27b5d8ee40c74be33c83807761c5eb5cea584 /Git/UpdateIndex.hs | |
parent | 8de7699f3905f5a3feb88cd6297f982f3666a201 (diff) |
thread safe git-annex index file use
Diffstat (limited to 'Git/UpdateIndex.hs')
-rw-r--r-- | Git/UpdateIndex.hs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Git/UpdateIndex.hs b/Git/UpdateIndex.hs index 929448729..69e5f1b3d 100644 --- a/Git/UpdateIndex.hs +++ b/Git/UpdateIndex.hs @@ -34,13 +34,11 @@ pureStreamer !s = \streamer -> streamer s {- Streams content into update-index from a list of Streamers. -} streamUpdateIndex :: Repo -> [Streamer] -> IO () -streamUpdateIndex repo as = - withHandle StdinHandle createProcessSuccess (proc "git" ps) $ \h -> do - fileEncoding h - forM_ as (stream h) - hClose h +streamUpdateIndex repo as = pipeWrite params repo $ \h -> do + fileEncoding h + forM_ as (stream h) + hClose h where - ps = toCommand $ gitCommandLine params repo params = map Param ["update-index", "-z", "--index-info"] stream h a = a (streamer h) streamer h s = do |