commitwalk

package
v0.40.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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.

func GetTopologicalOrderIterator

func GetTopologicalOrderIterator(ctx context.Context, ddb *doltdb.DoltDB, startCommitHash hash.Hash) (doltdb.CommitItr, error)

GetTopologicalOrderCommitIterator returns an iterator for commits generated with the same semantics as GetTopologicalOrderCommits

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL