Documentation
¶
Index ¶
- func CommitCount(ctx context.Context, repoPath string, start, end string) (int, error)
- func FastForward(ctx context.Context, refUpdater *hook.RefUpdater, repoPath, tmpDir string, ...) (mergeSHA sha.SHA, conflicts []string, err error)
- func FindConflicts(ctx context.Context, repoPath, base, head string) (mergeable bool, treeSHA string, conflicts []string, err error)
- func Merge(ctx context.Context, refUpdater *hook.RefUpdater, repoPath, tmpDir string, ...) (mergeSHA sha.SHA, conflicts []string, err error)
- func Rebase(ctx context.Context, refUpdater *hook.RefUpdater, repoPath, tmpDir string, ...) (mergeSHA sha.SHA, conflicts []string, err error)
- func Squash(ctx context.Context, refUpdater *hook.RefUpdater, repoPath, tmpDir string, ...) (mergeSHA sha.SHA, conflicts []string, err error)
- type Func
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommitCount ¶
CommitCount returns number of commits between the two git revisions.
func FastForward ¶
func FastForward( ctx context.Context, refUpdater *hook.RefUpdater, repoPath, tmpDir string, _, _ *api.Signature, _ string, mergeBaseSHA, targetSHA, sourceSHA sha.SHA, ) (mergeSHA sha.SHA, conflicts []string, err error)
FastForward points the is internal implementation of merge used for Merge and Squash methods.
func FindConflicts ¶
func FindConflicts( ctx context.Context, repoPath, base, head string, ) (mergeable bool, treeSHA string, conflicts []string, err error)
FindConflicts checks if two git revisions are mergeable and returns list of conflict files if they are not.
func Merge ¶
func Merge( ctx context.Context, refUpdater *hook.RefUpdater, repoPath, tmpDir string, author, committer *api.Signature, message string, mergeBaseSHA, targetSHA, sourceSHA sha.SHA, ) (mergeSHA sha.SHA, conflicts []string, err error)
Merge merges two the commits (targetSHA and sourceSHA) using the Merge method.
func Rebase ¶
func Rebase( ctx context.Context, refUpdater *hook.RefUpdater, repoPath, tmpDir string, _, committer *api.Signature, _ string, mergeBaseSHA, targetSHA, sourceSHA sha.SHA, ) (mergeSHA sha.SHA, conflicts []string, err error)
Rebase merges two the commits (targetSHA and sourceSHA) using the Rebase method.
func Squash ¶
func Squash( ctx context.Context, refUpdater *hook.RefUpdater, repoPath, tmpDir string, author, committer *api.Signature, message string, mergeBaseSHA, targetSHA, sourceSHA sha.SHA, ) (mergeSHA sha.SHA, conflicts []string, err error)
Squash merges two the commits (targetSHA and sourceSHA) using the Squash method.
Types ¶
type Func ¶
type Func func( ctx context.Context, refUpdater *hook.RefUpdater, repoPath, tmpDir string, author, committer *api.Signature, message string, mergeBaseSHA, targetSHA, sourceSHA sha.SHA, ) (mergeSHA sha.SHA, conflicts []string, err error)
Func represents a merge method function. The concrete merge implementation functions must have this signature.
Click to show internal directories.
Click to hide internal directories.