Documentation ¶
Index ¶
- func GetDotDotRevisions(ctx context.Context, includedDB *doltdb.DoltDB, includedHead hash.Hash, ...) ([]*doltdb.Commit, error)
- func GetTopNTopoOrderedCommitsMatching(ctx context.Context, ddb *doltdb.DoltDB, startCommitHash hash.Hash, n int, ...) ([]*doltdb.Commit, error)
- func GetTopologicalOrderCommits(ctx context.Context, ddb *doltdb.DoltDB, startCommitHash hash.Hash) ([]*doltdb.Commit, error)
- func GetTopologicalOrderIterator(ctx context.Context, ddb *doltdb.DoltDB, startCommitHash hash.Hash) (doltdb.CommitItr, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDotDotRevisions ¶
func GetDotDotRevisions(ctx context.Context, includedDB *doltdb.DoltDB, includedHead hash.Hash, excludedDB *doltdb.DoltDB, excludedHead hash.Hash, num int) ([]*doltdb.Commit, error)
GetDotDotRevisions returns the commits reachable from commit at hash `includedHead` that are not reachable from hash `excludedHead`. `includedHead` and `excludedHead` must be commits in `ddb`. Returns up to `num` commits, in reverse topological order starting at `includedHead`, with tie breaking based on the height of commit graph between concurrent commits --- higher commits appear first. Remaining ties are broken by timestamp; newer commits appear first.
Roughly mimics `git log main..feature`.
func GetTopNTopoOrderedCommitsMatching ¶
func GetTopNTopoOrderedCommitsMatching(ctx context.Context, ddb *doltdb.DoltDB, startCommitHash hash.Hash, n int, matchFn func(*doltdb.Commit) (bool, error)) ([]*doltdb.Commit, error)
GetTopNTopoOrderedCommitsMatching returns the first N commits (If N <= 0 then all commits) reachable from the commit at hash `startCommitHash` in reverse topological order, with tiebreaking done by the height of the commit graph -- higher commits appear first. Remaining ties are broken by timestamp; newer commits appear first.
func GetTopologicalOrderCommits ¶
func GetTopologicalOrderCommits(ctx context.Context, ddb *doltdb.DoltDB, startCommitHash hash.Hash) ([]*doltdb.Commit, error)
GetTopologicalOrderCommits returns the commits reachable from the commit at hash `startCommitHash` in reverse topological order, with tiebreaking done by the height of the commit graph -- higher commits appear first. Remaining ties are broken by timestamp; newer commits appear first.
Types ¶
This section is empty.