Skip to main content

Module commit_graph

Module commit_graph 

Source
Expand description

Commit-graph files for reachability and generation numbers.

Structs§

BloomWalkStats
Counters for GIT_TRACE2_PERF Bloom statistics (revision.c trace2_bloom_filter_statistics_atexit).
BloomWriteStats
Counters emitted as GIT_TRACE2_EVENT for Bloom generation (commit-graph.c).
CommitGraphChain
Loaded commit-graph chain (newest layer first, matching commit-graph-chain file order).
CommitGraphCommitInfo
Per-commit data needed to write CDAT / Bloom.
CommitGraphLayer
One layer from .git/objects/info/commit-graph or commit-graphs/<hash>.graph.
ParsedGraphDump
Parsed commit-graph header fields for debugging and --dump style output.

Enums§

BloomPrecheck
Result of consulting Bloom filters before running a tree diff (matches revision.c).

Functions§

atomic_replace_commit_graph
Replace objects/info/commit-graph atomically (lock + tempfile + rename).
bloom_filter_for_commit_write
Build Bloom filter bytes for one commit; returns cumulative size contribution for BIDX.
build_commit_graph_bytes
Build raw commit-graph bytes (without touching the filesystem).
collect_changed_paths_for_bloom
Re-export for commit-graph write. Every distinct path and parent directory for diff paths (Git pathmap order doesn’t matter).
collect_reachable_commit_oids
Collect reachable commit OIDs from on-disk ref tips under git_dir.
collect_reachable_commit_oids_for_repository
Collect reachable commit OIDs from ref tips via the repository RefStore.
commit_tree_has_high_bit_paths
Whether a commit’s tree (recursively) has any high-bit path bytes (bloom.c:commit_tree_has_high_bit_paths).
count_referenced_commit_tips
Count unique commit OIDs that refs point to directly (peeling annotated tags), matching Git’s add_ref_to_set accounting for the “Collecting referenced commits” progress meter. Unlike collect_reachable_commit_oids, this does not walk commit parents.
diff_changed_paths_for_bloom
Compute changed paths between parent and commit trees (recursive diff, no rename detection).
dump_bloom_filters
Dump hex lines of Bloom filters (one per commit, empty line for empty filter).
load_commit_graph_commit_info
Load commit metadata from the ODB for graph writing.
parse_graph_file
Parse all chunks for test-tool read-graph / debugging.
remove_commit_graph_chain_dir
Remove objects/info/commit-graphs when replacing a split chain with a single graph file.

Type Aliases§

BloomWalkStatsHandle
Shared stats handle for crate::rev_list::RevListOptions::bloom_stats.