History

all docs for git-commitgraph::file

Sebastian Thiel committed 5 years ago

Commit 8b262011 parent 23bba1c6 files · +54 −20Browse files

Showing the changes to git-commitgraph/src/file/mod.rs (1 of 6 files). Show all

Unified · Split

git-commitgraph/src/file/mod.rs+9−4
@@ -1,12 +1,17 @@
11 //! Operations on a single commit-graph file.
2+
23 mod access;
4+
5+///
36 pub mod commit;
7+pub use commit::Commit;
8+
49 mod init;
10+///
511 pub mod verify;
612
713 pub use init::Error;
814
9−pub use commit::Commit;
1015 use filebuffer::FileBuffer;
1116 use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
1217 use std::{
@@ -22,7 +27,7 @@ const SIGNATURE: &[u8] = b"CGPH"; · 9 unmodified lines
2227 /// A single commit-graph file.
2328 ///
2429 /// All operations on a `File` are local to that graph file. Since a commit graph can span multiple
25−/// files, all interesting graph operations belong on `Graph`.
30+/// files, all interesting graph operations belong on [`Graph`][crate::Graph].
2631 pub struct File {
2732 base_graph_count: u8,
2833 base_graphs_list_offset: Option<usize>,
@@ -39,8 +44,8 @@ pub struct File { · 10 unmodified lines
3944 /// Commits within a graph file are sorted in lexicographical order by OID; a commit's lexigraphical position
4045 /// is its position in this ordering. If a commit graph spans multiple files, each file's commits
4146 /// start at lexigraphical position 0, so it is unique across a single file but is not unique across
42−/// the whole commit graph. Each commit also has a graph position (`graph::Position`), which is unique
43−/// across the whole commit graph. In order to avoid accidentally mixing lexigraphical positions with graph
47+/// the whole commit graph. Each commit also has a graph position ([`graph::Position`][crate::graph::Position]),
48+/// which is unique /// across the whole commit graph. In order to avoid accidentally mixing lexigraphical positions with graph
4449 /// positions, distinct types are used for each.
4550 #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4651 pub struct Position(pub u32);