summaryrefslogtreecommitdiff
path: root/Git/CatFile.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <id@joeyh.name>2013-05-12 17:18:48 -0500
committerGravatar Joey Hess <id@joeyh.name>2013-05-12 17:29:49 -0500
commitb02c68304aa5051086e29a0cb6547fdf856aa93d (patch)
tree104139431d5e4df6258a7b7f000ecd605a3bf096 /Git/CatFile.hs
parentac86f7dbae96c5b813147bf8de5fe40df002671e (diff)
deal with git using / internally, even on DOS
Diffstat (limited to 'Git/CatFile.hs')
-rwxr-xr-x[-rw-r--r--]Git/CatFile.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Git/CatFile.hs b/Git/CatFile.hs
index b83241445..5ab10b187 100644..100755
--- a/Git/CatFile.hs
+++ b/Git/CatFile.hs
@@ -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. -}