From 591e293f43f7e4450b570f0e6e95c1a33cd50f44 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 2 Jul 2011 19:22:11 -0400 Subject: [PATCH] simplify git cat-file startup --- Branch.hs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Branch.hs b/Branch.hs index d9cbe61a72..c0c96611bf 100644 --- a/Branch.hs +++ b/Branch.hs @@ -237,11 +237,9 @@ catFile file = do where startup state = do g <- Annex.gitRepo - let cmd = Git.gitCommandLine g - [Param "cat-file", Param "--batch"] - let gitcmd = join " " ("git" : toCommand cmd) - (_, from, to) <- liftIO $ hPipeBoth "sh" - ["-c", "exec " ++ gitcmd ++ " 2>/dev/null"] + (_, from, to) <- liftIO $ hPipeBoth "git" $ + toCommand $ Git.gitCommandLine g + [Param "cat-file", Param "--batch"] setState state { catFileHandles = Just (from, to) } ask (from, to) ask (from, to) = liftIO $ do