splitter

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2017 License: MIT Imports: 13 Imported by: 9 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GitDirectory

func GitDirectory(path string) string

GitDirectory returns the .git directory for a given directory

func Split

func Split(config *Config, result *Result) error

Split splits a configuration

func SplitMessage

func SplitMessage(message string) (string, string)

SplitMessage splits a git message

Types

type Config

type Config struct {
	Prefixes   []*Prefix
	Path       string
	Origin     string
	Commit     string
	Target     string
	GitVersion string
	Debug      bool
	Scratch    bool

	// for advanced usage only
	// naming and types subject to change anytime!
	Logger *log.Logger
	DB     *bolt.DB
	RepoMu *sync.Mutex
	Repo   *git.Repository
	Git    int
}

Config represents a split configuration

func (*Config) Validate

func (config *Config) Validate() error

Validate validates the configuration

type Prefix

type Prefix struct {
	From string
	To   string
}

Prefix represents which paths to split

type Result

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

Result represents the outcome of a split

func NewResult

func NewResult(duration time.Duration, traversed, created int) *Result

NewResult returns a pre-populated result

func (*Result) Created

func (r *Result) Created() int

Created returns the number of created commits

func (*Result) Duration

func (r *Result) Duration(precision time.Duration) time.Duration

Duration returns the current duration of the split

func (*Result) Head

func (r *Result) Head() *git.Oid

Head returns the latest split sha1

func (*Result) Traversed

func (r *Result) Traversed() int

Traversed returns the number of commits traversed during the split

Jump to

Keyboard shortcuts

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