Documentation
¶
Overview ¶
Package git provides utilities for interacting with git repositories.
Index ¶
- Variables
- type Commit
- type Git
- func (g *Git) FindGitRepositoryRoot(ctx context.Context) (string, error)
- func (g *Git) GetAllCommits(ctx context.Context, chartPath string) ([]Commit, error)
- func (g *Git) GetDiffBetweenCommits(ctx context.Context, start, end, diffPath string) (string, error)
- func (g *Git) GetFileContent(ctx context.Context, hash, filePath string) (string, error)
- type Person
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidGitRef indicates a git ref contains unexpected characters. ErrInvalidGitRef = errors.New("invalid git ref") )
Functions ¶
This section is empty.
Types ¶
type Commit ¶
type Commit struct {
Hash string `yaml:"commit"`
Parent string `yaml:"parent"`
Refs string `yaml:"refs"`
Subject string `yaml:"subject"`
Author Person `yaml:"author"`
Commiter Person `yaml:"commiter"`
}
Commit represents a single git commit.
type Git ¶
Git wraps git CLI operations.
func (*Git) FindGitRepositoryRoot ¶
FindGitRepositoryRoot returns the absolute path to the root of the git repository.
func (*Git) GetAllCommits ¶
GetAllCommits returns all git commits affecting the given chart path.
Click to show internal directories.
Click to hide internal directories.