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

3
Annex/CatFile.hs Normal file → Executable file
View file

@ -21,6 +21,7 @@ import qualified Git
import qualified Git.CatFile
import qualified Annex
import Git.Types
import Git.FilePath
catFile :: Git.Branch -> FilePath -> Annex L.ByteString
catFile branch file = do
@ -48,7 +49,7 @@ catFileHandle = maybe startup return =<< Annex.getState Annex.catfilehandle
{- From the Sha or Ref of a symlink back to the key. -}
catKey :: Ref -> Annex (Maybe Key)
catKey ref = do
l <- encodeW8 . L.unpack <$> catObject ref
l <- fromInternalGitPath . encodeW8 . L.unpack <$> catObject ref
return $ if isLinkToAnnex l
then fileKey $ takeFileName l
else Nothing