local

package
v0.0.0-...-b044383 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 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 LocalGitHistory

type LocalGitHistory struct {
	// Path is the path to the local git repository.
	*git.Repository

	RootPath string
	// contains filtered or unexported fields
}

LocalGitHistory is history supplied by .git

func NewLocalGitHistory

func NewLocalGitHistory(path string) (*LocalGitHistory, error)

NewLocalGitHistory creates a new LocalGitRepo.

func (*LocalGitHistory) CommitParents

func (r *LocalGitHistory) CommitParents(commitID string) ([]string, error)

func (*LocalGitHistory) Diff

func (l *LocalGitHistory) Diff(currentCommitID string, olderCommitID string) ([]code.FileDiff, error)

func (*LocalGitHistory) GetFileContent

func (r *LocalGitHistory) GetFileContent(path string, commitID string) ([]byte, error)

func (*LocalGitHistory) HEAD

func (l *LocalGitHistory) HEAD() string

func (*LocalGitHistory) HeadCommitID

func (l *LocalGitHistory) HeadCommitID() (string, error)

HeadCommitID returns the commit ID of the HEAD of the repository.

func (*LocalGitHistory) SaveAllFiles

func (l *LocalGitHistory) SaveAllFiles() error

Jump to

Keyboard shortcuts

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