git

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChurnOpts = ChurnOptions{
	CommitCount:  0,
	SortBy:       Changes,
	Top:          10,
	Path:         "",
	ExcludePath:  "",
	Extensions:   "",
	Since:        Date{},
	Until:        Date{},
	OutputFormat: Tabular,
}

Functions

func MostChurnFiles

func MostChurnFiles(repoPath string) ([]*complexity.ChurnChunk, error)

func PrintRepoStats

func PrintRepoStats(repoPath string) error

func ReadChurn

func ReadChurn(repoPath string, opts ChurnOptions) ([]*complexity.ChurnChunk, error)

Types

type ChurnOptions

type ChurnOptions struct {
	CommitCount  int
	SortBy       SortType
	Top          int
	Path         string
	ExcludePath  string
	Extensions   string
	Since        Date
	Until        Date
	OutputFormat OutputType
}

type Date

type Date struct {
	time.Time
}

func (*Date) Set

func (d *Date) Set(value string) error

func (*Date) String

func (d *Date) String() string

func (*Date) Type

func (d *Date) Type() string

type OutputType

type OutputType = string

OutputType represents the type of output to be generated of churn subcommand

var (
	JSON          OutputType = "json"
	Tabular       OutputType = "tabular"
	OutputFormats            = []OutputType{JSON, Tabular}
)

type SortType

type SortType = string

SortType represents the type of sorting to be performed on the results of git log

var (
	Changes   SortType = "changes"
	Additions SortType = "additions"
	Deletions SortType = "deletions"
	Commits   SortType = "commits"
)

Jump to

Keyboard shortcuts

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