{"modulePath":"github.com/jesseduffield/lazygit","version":"v0.8.2","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package git\n\n## Types\n\n```go\ntype BranchListBuilder struct {\n\tLog        *logrus.Entry\n\tGitCommand *commands.GitCommand\n}\n```\nBranchListBuilder returns a list of Branch objects for the current repo\n\n```go\nfunc NewBranchListBuilder(log *logrus.Entry, gitCommand *commands.GitCommand) (*BranchListBuilder, error)\n```\nNewBranchListBuilder builds a new branch list builder\n\n```go\nfunc (b *BranchListBuilder) Build() []*commands.Branch\n```\nBuild the list of branches for the current repo\n\n```go\ntype CommitListBuilder struct {\n\tLog                 *logrus.Entry\n\tGitCommand          *commands.GitCommand\n\tOSCommand           *commands.OSCommand\n\tTr                  *i18n.Localizer\n\tCherryPickedCommits []*commands.Commit\n\tDiffEntries         []*commands.Commit\n}\n```\nCommitListBuilder returns a list of Branch objects for the current repo\n\n```go\nfunc NewCommitListBuilder(log *logrus.Entry, gitCommand *commands.GitCommand, osCommand *commands.OSCommand, tr *i18n.Localizer, cherryPickedCommits []*commands.Commit, diffEntries []*commands.Commit) (*CommitListBuilder, error)\n```\nNewCommitListBuilder builds a new commit list builder\n\n```go\nfunc (c *CommitListBuilder) GetCommits() ([]*commands.Commit, error)\n```\nGetCommits obtains the commits of the current branch\n\n```go\ntype PatchModifier struct {\n\tLog *logrus.Entry\n\tTr  *i18n.Localizer\n}\n```\n\n```go\nfunc NewPatchModifier(log *logrus.Entry) (*PatchModifier, error)\n```\nNewPatchModifier builds a new branch list builder\n\n```go\nfunc (p *PatchModifier) ModifyPatchForHunk(patch string, hunkStarts []int, currentLine int) (string, error)\n```\nModifyPatchForHunk takes the original patch, which may contain several hunks, and removes any hunks that aren't the selected hunk\n\n```go\nfunc (p *PatchModifier) ModifyPatchForLine(patch string, lineNumber int) (string, error)\n```\nModifyPatchForLine takes the original patch, which may contain several hunks, and the line number of the line we want to stage\n\n```go\ntype PatchParser struct {\n\tLog *logrus.Entry\n}\n```\n\n```go\nfunc NewPatchParser(log *logrus.Entry) (*PatchParser, error)\n```\nNewPatchParser builds a new branch list builder\n\n```go\nfunc (p *PatchParser) ParsePatch(patch string) ([]int, []int, error)\n```\n\n","path":"github.com/jesseduffield/lazygit/pkg/git","name":"git","synopsis":"","isRedistributable":true}
