git

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchListBuilder

type BranchListBuilder struct {
	Log        *logrus.Entry
	GitCommand *commands.GitCommand
}

BranchListBuilder returns a list of Branch objects for the current repo

func NewBranchListBuilder

func NewBranchListBuilder(log *logrus.Entry, gitCommand *commands.GitCommand) (*BranchListBuilder, error)

NewBranchListBuilder builds a new branch list builder

func (*BranchListBuilder) Build

func (b *BranchListBuilder) Build() []*commands.Branch

Build the list of branches for the current repo

type CommitListBuilder added in v0.8.1

type CommitListBuilder struct {
	Log                 *logrus.Entry
	GitCommand          *commands.GitCommand
	OSCommand           *commands.OSCommand
	Tr                  *i18n.Localizer
	CherryPickedCommits []*commands.Commit
	DiffEntries         []*commands.Commit
}

CommitListBuilder returns a list of Branch objects for the current repo

func NewCommitListBuilder added in v0.8.1

func NewCommitListBuilder(log *logrus.Entry, gitCommand *commands.GitCommand, osCommand *commands.OSCommand, tr *i18n.Localizer, cherryPickedCommits []*commands.Commit, diffEntries []*commands.Commit) (*CommitListBuilder, error)

NewCommitListBuilder builds a new commit list builder

func (*CommitListBuilder) GetCommits added in v0.8.1

func (c *CommitListBuilder) GetCommits() ([]*commands.Commit, error)

GetCommits obtains the commits of the current branch

type PatchModifier added in v0.8.1

type PatchModifier struct {
	Log *logrus.Entry
	Tr  *i18n.Localizer
}

func NewPatchModifier added in v0.8.1

func NewPatchModifier(log *logrus.Entry) (*PatchModifier, error)

NewPatchModifier builds a new branch list builder

func (*PatchModifier) ModifyPatchForHunk added in v0.8.1

func (p *PatchModifier) ModifyPatchForHunk(patch string, hunkStarts []int, currentLine int) (string, error)

ModifyPatchForHunk takes the original patch, which may contain several hunks, and removes any hunks that aren't the selected hunk

func (*PatchModifier) ModifyPatchForLine added in v0.8.1

func (p *PatchModifier) ModifyPatchForLine(patch string, lineNumber int) (string, error)

ModifyPatchForLine takes the original patch, which may contain several hunks, and the line number of the line we want to stage

type PatchParser added in v0.8.1

type PatchParser struct {
	Log *logrus.Entry
}

func NewPatchParser added in v0.8.1

func NewPatchParser(log *logrus.Entry) (*PatchParser, error)

NewPatchParser builds a new branch list builder

func (*PatchParser) ParsePatch added in v0.8.1

func (p *PatchParser) ParsePatch(patch string) ([]int, []int, error)

Jump to

Keyboard shortcuts

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