Documentation ¶
Index ¶
- type LocalGitHistory
- func (r *LocalGitHistory) CommitParents(commitID string) ([]string, error)
- func (l *LocalGitHistory) Diff(currentCommitID string, olderCommitID string) ([]code.FileDiff, error)
- func (r *LocalGitHistory) GetFileContent(path string, commitID string) ([]byte, error)
- func (l *LocalGitHistory) HEAD() string
- func (l *LocalGitHistory) HeadCommitID() (string, error)
- func (l *LocalGitHistory) SaveAllFiles() error
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) 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
Click to show internal directories.
Click to hide internal directories.