go-git.v4: gopkg.in/src-d/go-git.v4/internal/revision Index | Files

package revision

import "gopkg.in/src-d/go-git.v4/internal/revision"

Package revision extracts git revision from string More informations about revision : https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html

Index

Package Files

parser.go scanner.go token.go

type AtCheckout Uses

type AtCheckout struct {
    Depth int
}

AtCheckout represents @{-n}

type AtDate Uses

type AtDate struct {
    Date time.Time
}

AtDate represents @{"2006-01-02T15:04:05Z"}

type AtPush Uses

type AtPush struct {
    BranchName string
}

AtPush represents @{push}

type AtReflog Uses

type AtReflog struct {
    Depth int
}

AtReflog represents @{n}

type AtUpstream Uses

type AtUpstream struct {
    BranchName string
}

AtUpstream represents @{upstream}, @{u}

type CaretPath Uses

type CaretPath struct {
    Depth int
}

CaretPath represents ^, ^{n}

type CaretReg Uses

type CaretReg struct {
    Regexp *regexp.Regexp
    Negate bool
}

CaretReg represents ^{/foo bar}

type CaretType Uses

type CaretType struct {
    ObjectType string
}

CaretType represents ^{commit}

type ColonPath Uses

type ColonPath struct {
    Path string
}

ColonPath represents :./<path> :<path>

type ColonReg Uses

type ColonReg struct {
    Regexp *regexp.Regexp
    Negate bool
}

ColonReg represents :/foo bar

type ColonStagePath Uses

type ColonStagePath struct {
    Path  string
    Stage int
}

ColonStagePath represents :<n>:/<path>

type ErrInvalidRevision Uses

type ErrInvalidRevision struct {
    // contains filtered or unexported fields
}

ErrInvalidRevision is emitted if string doesn't match valid revision

func (*ErrInvalidRevision) Error Uses

func (e *ErrInvalidRevision) Error() string

type Parser Uses

type Parser struct {
    // contains filtered or unexported fields
}

Parser represents a parser use to tokenize and transform to revisioner chunks a given string

func NewParser Uses

func NewParser(r io.Reader) *Parser

NewParser returns a new instance of parser.

func NewParserFromString Uses

func NewParserFromString(s string) *Parser

NewParserFromString returns a new instance of parser from a string.

func (*Parser) Parse Uses

func (p *Parser) Parse() ([]Revisioner, error)

Parse explode a revision string into revisioner chunks

type Ref Uses

type Ref string

Ref represents a reference name : HEAD, master

type Revisioner Uses

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

type TildePath Uses

type TildePath struct {
    Depth int
}

TildePath represents ~, ~{n}

Package revision imports 8 packages (graph) and is imported by 1 packages. Updated 2019-08-01. Refresh now. Tools for package owners.