| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Git.Ref
Description
A ref is a pointer to a hash (or "symref", which is a pointer to another ref). Refs are just files
under .git (usually .git/refs, though HEAD is a notable exception) that contain the (40-byte)
hash to which they refer. We factor refs into Refs proper and RefFiles---the former denoting
a ref's name, and the latter the contents of ref file.
Documentation
A reference to a git hash
Constructors
| HEAD | |
| Branch RefName | branches under |
| TagRef RefName (Maybe Sha1) | tags under |
| RemRef RemoteName RefName | remote refs under |
| ExpRef RefName | any path under |
The contents of a file containing a Ref. Either a Sha1 or a "Symbolic Reference" (e.g.,
ref: refsheadsmaster) to another Ref.
readRefFile :: RawFilePath -> IO (Maybe RefFile) Source #
Try to parse a RefFile out of an actual file.
readPackedRefsFile :: RawFilePath -> IO (Maybe [(Ref, Sha1)]) Source #
Try to parse any given packed-refs file.