Documentation ¶
Index ¶
- func FirstParent(r *gogit.Repository, c *object.Commit) (*object.Commit, error)
- func FirstParentList(r *gogit.Repository, c *object.Commit) ([]*object.Commit, error)
- func MergePoints(r *gogit.Repository, mainLine []*object.Commit) (map[plumbing.Hash]*object.Commit, error)
- func SourceCommitToDstCommits(r *gogit.Repository, commitMsgTag string, ...) (map[plumbing.Hash]plumbing.Hash, error)
- func SourceHash(c *object.Commit, tag string) plumbing.Hash
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstParent ¶
FirstParent returns the first parent of a commit. For a merge commit this is the parent which is usually depicted on the left.
func FirstParentList ¶
FirstParentList visits the ancestors of c using the FirstParent func. It returns the list of visited commits.
func MergePoints ¶
func MergePoints(r *gogit.Repository, mainLine []*object.Commit) (map[plumbing.Hash]*object.Commit, error)
MergePoints creates a look-up table from feature branch commit hashes to their merge commits onto the given mainline.
func SourceCommitToDstCommits ¶
func SourceCommitToDstCommits(r *gogit.Repository, commitMsgTag string, dstFirstParents, srcFirstParents []*object.Commit) (map[plumbing.Hash]plumbing.Hash, error)
SourceCommitToDstCommits returns a mapping from all kube mainline commits to the corresponding dst commits after collapsing using "git filter-branch --sub-directory-filter":
dst upstream
| | F'<--F z | y | E'<--E x ,D | / | C'<--C w | v<-, | |-B `A - initial commit
func SourceHash ¶
SourceHash extracts kube commit from commit message The baseRepoName default to "kubernetes". TODO: Refactor so we take the commitMsgTag as argument and don't need to construct the ancientSyncCommitSubjectPrefix or sourceCommitPrefix.
Types ¶
This section is empty.