Documentation ¶
Index ¶
- Constants
- func CloneRepository(url *string, branch *string, depth int, auth transport.AuthMethod) (*git.Repository, string, error)
- func GatherPaths(dir, branch string, targets []string) ([]string, error)
- func GetChangeAction(change *object.Change) string
- func GetChangePath(change *object.Change) string
- func GetChanges(commit *object.Commit, repo *git.Repository) (object.Changes, error)
- func GetLatestCommitHash(dir string) (string, error)
- func GetParentCommit(commit *object.Commit, repo *git.Repository) (*object.Commit, error)
- func GetPatch(change *object.Change) (*object.Patch, error)
- func GetRepositoryHistory(repository *git.Repository) ([]*object.Commit, error)
Constants ¶
View Source
const (
// EmptyTreeCommitID is a hash representing empty tree
EmptyTreeCommitID = "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
)
Variables ¶
This section is empty.
Functions ¶
func CloneRepository ¶
func CloneRepository(url *string, branch *string, depth int, auth transport.AuthMethod) (*git.Repository, string, error)
CloneRepository clones a repository from a remote source to local temp. dir.
func GatherPaths ¶
GatherPaths gets all committed file paths
func GetChangeAction ¶
GetChangeAction gets change action
func GetChangePath ¶
GetChangePath gets change path
func GetChanges ¶
GetChanges gets the changes since a commit till current HEAD
func GetLatestCommitHash ¶
GetLatestCommitHash runs a git cmd to return latest commit hash
func GetParentCommit ¶
GetParentCommit gets parent commit
func GetRepositoryHistory ¶
GetRepositoryHistory gets commit history of a git repo.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.