deal with git using / internally, even on DOS
This commit is contained in:
parent
a2f83b28f3
commit
73d2f8b280
6 changed files with 40 additions and 8 deletions
4
Git/CatFile.hs
Normal file → Executable file
4
Git/CatFile.hs
Normal file → Executable file
|
@ -23,6 +23,7 @@ import Git
|
|||
import Git.Sha
|
||||
import Git.Command
|
||||
import Git.Types
|
||||
import Git.FilePath
|
||||
import qualified Utility.CoProcess as CoProcess
|
||||
|
||||
type CatFileHandle = CoProcess.CoProcessHandle
|
||||
|
@ -38,7 +39,8 @@ catFileStop = CoProcess.stop
|
|||
|
||||
{- Reads a file from a specified branch. -}
|
||||
catFile :: CatFileHandle -> Branch -> FilePath -> IO L.ByteString
|
||||
catFile h branch file = catObject h $ Ref $ show branch ++ ":" ++ file
|
||||
catFile h branch file = catObject h $ Ref $
|
||||
show branch ++ ":" ++ toInternalGitPath file
|
||||
|
||||
{- Uses a running git cat-file read the content of an object.
|
||||
- Objects that do not exist will have "" returned. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue