set raw mode for git check-attr
This commit is contained in:
parent
7a92a0f908
commit
06551ad86b
2 changed files with 2 additions and 5 deletions
7
Git/CheckAttr.hs
Normal file → Executable file
7
Git/CheckAttr.hs
Normal file → Executable file
|
@ -22,7 +22,7 @@ type Attr = String
|
||||||
checkAttrStart :: [Attr] -> Repo -> IO CheckAttrHandle
|
checkAttrStart :: [Attr] -> Repo -> IO CheckAttrHandle
|
||||||
checkAttrStart attrs repo = do
|
checkAttrStart attrs repo = do
|
||||||
cwd <- getCurrentDirectory
|
cwd <- getCurrentDirectory
|
||||||
h <- gitCoProcessStart params repo
|
h <- CoProcess.rawMode =<< gitCoProcessStart params repo
|
||||||
return (h, attrs, cwd)
|
return (h, attrs, cwd)
|
||||||
where
|
where
|
||||||
params =
|
params =
|
||||||
|
@ -43,11 +43,8 @@ checkAttr (h, attrs, cwd) want file = do
|
||||||
[v] -> return v
|
[v] -> return v
|
||||||
_ -> error $ "unable to determine " ++ want ++ " attribute of " ++ file
|
_ -> error $ "unable to determine " ++ want ++ " attribute of " ++ file
|
||||||
where
|
where
|
||||||
send to = do
|
send to = hPutStr to $ file' ++ "\0"
|
||||||
fileEncoding to
|
|
||||||
hPutStr to $ file' ++ "\0"
|
|
||||||
receive from = forM attrs $ \attr -> do
|
receive from = forM attrs $ \attr -> do
|
||||||
fileEncoding from
|
|
||||||
l <- hGetLine from
|
l <- hGetLine from
|
||||||
return (attr, attrvalue attr l)
|
return (attr, attrvalue attr l)
|
||||||
{- Before git 1.7.7, git check-attr worked best with
|
{- Before git 1.7.7, git check-attr worked best with
|
||||||
|
|
0
Git/LsFiles.hs
Normal file → Executable file
0
Git/LsFiles.hs
Normal file → Executable file
Loading…
Add table
Add a link
Reference in a new issue