Struct git_commitgraph::graph::Graph[][src]

pub struct Graph { /* fields omitted */ }
Expand description

A complete commit graph.

The data in the commit graph may come from a monolithic objects/info/commit-graph file, or it may come from one or more objects/info/commit-graphs/graph-*.graph files. These files are generated via git commit-graph write ... commands.

Implementations

Access

Returns the commit at the given position pos.

Panics

If pos is greater or equal to num_commits().

Returns the commit matching the given id.

Returns the hash at the given position pos.

Panics

If pos is greater or equal to num_commits().

Iterate over commits in unsorted order.

Iterate over commit IDs in unsorted order.

Translate the given id to its position in the file.

Returns the number of commits stored in this file.

Instantiate a Graph from various sources.

Instantiate a commit graph from path which may be a directory containing graph files or the graph file itself.

Instantiate a commit graph from the directory containing all of its files.

Instantiate a commit graph from a .git/objects/info/commit-graph or .git/objects/info/commit-graphs/graph-*.graph file.

Instantiate a commit graph from an .git/objects/info directory.

Create a new commit graph from a list of files.

Traverse all commits in the graph and call processor(&commit) -> Result<(), E> on it while verifying checksums.

When processor returns an error, the entire verification is stopped and the error returned.

Trait Implementations

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.