Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
readFile :: GitSource -> FilePath -> FilePath -> IO ByteString Source
readFile reads FilePath from repository at GitSource
Implemented by clone uri; checkout ref/rev and then just readFile
Other approach could be: git archive --remote=uri tree-ish filepath But it's not currently possible as the tree-ish is too restricted:
- Clients may not use other sha1 expressions, even if the end result is reachable. E.g., neither a relative commit like master^ nor a literal sha1 like abcd1234 is allowed, even if the result is reachable from the refs. [1]_
.. [1]: man git-upload-archive