Data.Git.Named

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 #

Represent a named specifier.

Constructors

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

Instances

Eq RefSpecTy # |
Methods (==) :: RefSpecTy -> RefSpecTy -> Bool # (/=) :: RefSpecTy -> RefSpecTy -> Bool #
Ord RefSpecTy # |
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 # |
Methods showsPrec :: Int -> RefSpecTy -> ShowS # show :: RefSpecTy -> String # showList :: [RefSpecTy] -> ShowS #

data RefContentTy #

content of a ref file.

Constructors

RefDirect Ref |
RefLink RefSpecTy |
RefContentUnknown ByteString |

Instances

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

newtype RefName #

Constructors

RefName |
Fields refNameRaw :: String

Instances

Eq RefName # |
Methods (==) :: RefName -> RefName -> Bool # (/=) :: RefName -> RefName -> Bool #
Ord RefName # |
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 # |
Methods showsPrec :: Int -> RefName -> ShowS # show :: RefName -> String # showList :: [RefName] -> ShowS #
IsString RefName # |
Methods fromString :: String -> RefName #

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

data PackedRefs a #

Constructors

PackedRefs |
Fields packedRemotes :: a packedBranchs :: a packedTags :: a

# manipulating loosed name references

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

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

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

# listings looses name references

looseHeadsList :: FilePath -> IO [RefName] #

looseTagsList :: FilePath -> IO [RefName] #

looseRemotesList :: FilePath -> IO [RefName] #