Documentation ¶
Overview ¶
Package revision extracts git revision from string More information about revision : https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtUpstream ¶
type AtUpstream struct {
BranchName string
}
AtUpstream represents @{upstream}, @{u}
type ColonStagePath ¶
ColonStagePath represents :<n>:/<path>
type ErrInvalidRevision ¶
type ErrInvalidRevision struct {
// contains filtered or unexported fields
}
ErrInvalidRevision is emitted if string doesn't match valid revision
func (*ErrInvalidRevision) Error ¶
func (e *ErrInvalidRevision) Error() string
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser represents a parser use to tokenize and transform to revisioner chunks a given string
func NewParserFromString ¶
NewParserFromString returns a new instance of parser from a string.
func (*Parser) Parse ¶
func (p *Parser) Parse() ([]Revisioner, error)
Parse explode a revision string into revisioner chunks
type Revisioner ¶
type Revisioner interface { }
Revisioner represents a revision component. A revision is made of multiple revision components obtained after parsing a revision string, for instance revision "master~" will be converted in two revision components Ref and TildePath