hit-0.6.3: Git operations in haskell

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | unix
Safe Haskell | None
Language | Haskell98

Data.Git.Named

Contents

- manipulating loosed name references
- listings looses name references

Description

Manipulation of named references * reading packed-refs file * reading single headstagsremote file

Synopsis

- data RefSpecTy
  - = RefHead
  - | RefOrigHead
  - | RefFetchHead
  - | RefBranch RefName
  - | RefTag RefName
  - | RefRemote RefName
  - | RefPatches String
  - | RefStash
  - | RefOther String
- data RefContentTy
  - = RefDirect Ref
  - | RefLink RefSpecTy
  - | RefContentUnknown ByteString
- newtype RefName = RefName {
  - refNameRaw :: String
  }
- readPackedRefs :: FilePath -> ([(RefName, Ref)] -> a) -> IO (PackedRefs a)
- data PackedRefs a = PackedRefs {
  - packedRemotes :: a
  - packedBranchs :: a
  - packedTags :: a
  }
- existsRefFile :: FilePath -> RefSpecTy -> IO Bool
- writeRefFile :: FilePath -> RefSpecTy -> RefContentTy -> IO ()
- readRefFile :: FilePath -> RefSpecTy -> IO RefContentTy
- looseHeadsList :: FilePath -> IO [RefName]
- looseTagsList :: FilePath -> IO [RefName]
- looseRemotesList :: FilePath -> IO [RefName]

# Documentation

data RefSpecTy Source #

Represent a named specifier.

Constructors

RefHead |
RefOrigHead |
RefFetchHead |
RefBranch RefName |
RefTag RefName |
RefRemote RefName |
RefPatches String |
RefStash |
RefOther String |

Instances

Eq RefSpecTy Source # |
Methods (==) :: RefSpecTy -> RefSpecTy -> Bool # (/=) :: RefSpecTy -> RefSpecTy -> Bool #
Ord RefSpecTy Source # |
Methods compare :: RefSpecTy -> RefSpecTy -> Ordering # (<) :: RefSpecTy -> RefSpecTy -> Bool # (<=) :: RefSpecTy -> RefSpecTy -> Bool # (>) :: RefSpecTy -> RefSpecTy -> Bool # (>=) :: RefSpecTy -> RefSpecTy -> Bool # max :: RefSpecTy -> RefSpecTy -> RefSpecTy # min :: RefSpecTy -> RefSpecTy -> RefSpecTy #
Show RefSpecTy Source # |
Methods showsPrec :: Int -> RefSpecTy -> ShowS # show :: RefSpecTy -> String # showList :: [RefSpecTy] -> ShowS #

data RefContentTy Source #

content of a ref file.

Constructors

RefDirect Ref |
RefLink RefSpecTy |
RefContentUnknown ByteString |

Instances

Eq RefContentTy Source # |
Methods (==) :: RefContentTy -> RefContentTy -> Bool # (/=) :: RefContentTy -> RefContentTy -> Bool #
Show RefContentTy Source # |
Methods showsPrec :: Int -> RefContentTy -> ShowS # show :: RefContentTy -> String # showList :: [RefContentTy] -> ShowS #

newtype RefName Source #

Constructors

RefName |

Fields

- refNameRaw :: String

Instances

Eq RefName Source # |
Methods (==) :: RefName -> RefName -> Bool # (/=) :: RefName -> RefName -> Bool #
Ord RefName Source # |
Methods compare :: RefName -> RefName -> Ordering # (<) :: RefName -> RefName -> Bool # (<=) :: RefName -> RefName -> Bool # (>) :: RefName -> RefName -> Bool # (>=) :: RefName -> RefName -> Bool # max :: RefName -> RefName -> RefName # min :: RefName -> RefName -> RefName #
Show RefName Source # |
Methods showsPrec :: Int -> RefName -> ShowS # show :: RefName -> String # showList :: [RefName] -> ShowS #
IsString RefName Source # |
Methods fromString :: String -> RefName #

readPackedRefs :: FilePath -> ([(RefName, Ref)] -> a) -> IO (PackedRefs a) Source #

data PackedRefs a Source #

Constructors

PackedRefs |

Fields

- packedRemotes :: a
- packedBranchs :: a
- packedTags :: a

# manipulating loosed name references

existsRefFile :: FilePath -> RefSpecTy -> IO Bool Source #

writeRefFile :: FilePath -> RefSpecTy -> RefContentTy -> IO () Source #

readRefFile :: FilePath -> RefSpecTy -> IO RefContentTy Source #

# listings looses name references

looseHeadsList :: FilePath -> IO [RefName] Source #

looseTagsList :: FilePath -> IO [RefName] Source #

looseRemotesList :: FilePath -> IO [RefName] Source #