git

package
v0.49.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FallbackTimeValue = time.Unix(1<<63-62135596801, 999999999)

FallbackTimeValue is the value returned by `SafeTimeParse` in case it encounters a parse error. It's the maximum time value possible in golang. See https://gitlab.com/gitlab-org/gitaly/issues/556#note_40289573

Functions

func Command added in v0.41.0

func Command(ctx context.Context, repo *pb.Repository, args ...string) (*command.Command, error)

Command creates a git.Command with the given args

func IsValidRef added in v0.41.0

func IsValidRef(ctx context.Context, repo *pb.Repository, ref string) bool

IsValidRef checks if a ref in a repo is valid

func NewCommit

func NewCommit(id, subject, body, authorName, authorEmail, authorDate,
	committerName, committerEmail, committerDate []byte, parentIds ...string) (*pb.GitCommit, error)

NewCommit creates a commit based on the given elements

func SafeTimeParse added in v0.40.0

func SafeTimeParse(timeStr string) time.Time

SafeTimeParse parses a git date string with the RFC3339 format. If the date is invalid (possibly because the date is larger than golang's largest value) it returns the maximum date possible.

func ValidateRevision added in v0.31.0

func ValidateRevision(revision []byte) error

ValidateRevision checks if a revision looks valid

func Version added in v0.46.0

func Version() (string, error)

Version returns the used git version.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL