git

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitMessage added in v0.17.0

func CommitMessage(cmd CommandRunner, sha string) (string, error)

func CurrentBranch

func CurrentBranch(cmd CommandRunner) (string, error)

func HeadCommit

func HeadCommit(cmd CommandRunner) (string, error)

func RunGit

func RunGit(args ...string) (content []byte, err error)

Types

type CommandRunner

type CommandRunner func(args ...string) ([]byte, error)

type CommitRangeResults

type CommitRangeResults struct {
	From    string
	To      string
	Commits []string
}

func CommitRange

func CommitRange(cmd CommandRunner, baseBranch string) (cr CommitRangeResults, err error)

func (CommitRangeResults) String

func (gcr CommitRangeResults) String() string

type FileBlames

type FileBlames map[string]LineBlames

type LineBlame

type LineBlame struct {
	Filename string
	Line     int
	Commit   string
}

type LineBlames

type LineBlames []LineBlame

func Blame

func Blame(path string, cmd CommandRunner) (lines LineBlames, err error)

Jump to

Keyboard shortcuts

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