blame

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blame

type Blame struct {
	SHA       string
	Author    Event
	Committer Event
	Range     [2]int
}

Blame represents the "blame" of a particular line or range of lines

func (*Blame) String

func (blame *Blame) String() string

type Event

type Event struct {
	Name  string
	Email string
	When  time.Time
}

Event represents the who and when of a commit event

func (*Event) String

func (event *Event) String() string

type Options

type Options struct {
	Directory string
	SHA       string
	Lines     []int
}

Options are options to determine what and how to blame

type Result

type Result map[int]Blame

Result is a mapping of line numbers to blames for a given file

func Exec

func Exec(ctx context.Context, filePath string, options *Options) (Result, error)

Exec uses git to lookup the blame of a file, given the supplied options

Jump to

Keyboard shortcuts

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