aboutsummaryrefslogtreecommitdiff
path: root/Git/Queue.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-24 20:50:39 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-08-24 20:50:39 -0400
commitc9b3b8829dc3f106583fb933808179ec02773790 (patch)
treed2b27b5d8ee40c74be33c83807761c5eb5cea584 /Git/Queue.hs
parent8de7699f3905f5a3feb88cd6297f982f3666a201 (diff)
thread safe git-annex index file use
Diffstat (limited to 'Git/Queue.hs')
-rw-r--r--Git/Queue.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Git/Queue.hs b/Git/Queue.hs
index f515ad104..9f7a44882 100644
--- a/Git/Queue.hs
+++ b/Git/Queue.hs
@@ -19,6 +19,7 @@ module Git.Queue (
import qualified Data.Map as M
import System.IO
+import System.Process
import Data.String.Utils
import Utility.SafeCommand
@@ -148,11 +149,12 @@ runAction repo (UpdateIndexAction streamers) =
-- list is stored in reverse order
Git.UpdateIndex.streamUpdateIndex repo $ reverse streamers
runAction repo action@(CommandAction {}) =
- withHandle StdinHandle createProcessSuccess (proc "xargs" params) $ \h -> do
+ withHandle StdinHandle createProcessSuccess p $ \h -> do
fileEncoding h
hPutStr h $ join "\0" $ getFiles action
hClose h
where
+ p = (proc "xargs" params) { env = gitEnv repo }
params = "-0":"git":baseparams
baseparams = toCommand $ gitCommandLine
(Param (getSubcommand action):getParams action) repo