simplify git cat-file startup
This commit is contained in:
parent
f626512b07
commit
591e293f43
1 changed files with 3 additions and 5 deletions
|
@ -237,11 +237,9 @@ catFile file = do
|
||||||
where
|
where
|
||||||
startup state = do
|
startup state = do
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
let cmd = Git.gitCommandLine g
|
(_, from, to) <- liftIO $ hPipeBoth "git" $
|
||||||
[Param "cat-file", Param "--batch"]
|
toCommand $ Git.gitCommandLine g
|
||||||
let gitcmd = join " " ("git" : toCommand cmd)
|
[Param "cat-file", Param "--batch"]
|
||||||
(_, from, to) <- liftIO $ hPipeBoth "sh"
|
|
||||||
["-c", "exec " ++ gitcmd ++ " 2>/dev/null"]
|
|
||||||
setState state { catFileHandles = Just (from, to) }
|
setState state { catFileHandles = Just (from, to) }
|
||||||
ask (from, to)
|
ask (from, to)
|
||||||
ask (from, to) = liftIO $ do
|
ask (from, to) = liftIO $ do
|
||||||
|
|
Loading…
Reference in a new issue