deal with git using / internally, even on DOS

This commit is contained in:
Joey Hess 2013-05-12 17:18:48 -05:00
parent a2f83b28f3
commit 73d2f8b280
6 changed files with 40 additions and 8 deletions

4
Git/CatFile.hs Normal file → Executable file
View 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. -}