miss-0: A Haskell git implimentation

Safe HaskellSafe
LanguageHaskell2010

Data.Git.RefName

Contents

Description

Git constrains the names of references (branches, tags, etc.) to a collection of 10-or-so rules (see git help check-ref-format for details). This module provides checked wrappers for refnames and remote names.

Synopsis

Reference Names

data RefName Source #

Safe reference names. Construct with refName.

Instances
Eq RefName Source # 
Instance details

Defined in Data.Git.RefName

Methods

(==) :: RefName -> RefName -> Bool #

(/=) :: RefName -> RefName -> Bool #

Ord RefName Source # 
Instance details

Defined in Data.Git.RefName

Show RefName Source # 
Instance details

Defined in Data.Git.RefName

IsString RefName Source # 
Instance details

Defined in Data.Git.RefName

Methods

fromString :: String -> RefName #

refName :: RawFilePath -> Maybe RefName Source #

Try to make a RefName, given that checkRefFormat allows it.

checkRefFormat Source #

Arguments

:: Bool

Allow refnames with no /s, as --allow-onelevel

-> Bool

Allow one and only one asterisk in a ref, as --refspec-pattern

-> RawFilePath 
-> Bool 

Check a potential refname against the rules for well formed refnames according to git help check-ref-format

Remote Names

data RemoteName Source #

Safe remote names. Construct with remoteName.

remoteName :: RawFilePath -> Maybe RemoteName Source #

Try to make a RemoteName, ensuring it's valid according to checkRemoteName.