Showing the changes to git-commitgraph/src/file/mod.rs (1 of 6 files). Show all
Unified · Split
| @@ -1,12 +1,17 @@ | ||
| 1 | 1 | //! Operations on a single commit-graph file. |
| 2 | + | |
| 2 | 3 | mod access; |
| 4 | + | |
| 5 | +/// | |
| 3 | 6 | pub mod commit; |
| 7 | +pub use commit::Commit; | |
| 8 | + | |
| 4 | 9 | mod init; |
| 10 | +/// | |
| 5 | 11 | pub mod verify; |
| 6 | 12 | |
| 7 | 13 | pub use init::Error; |
| 8 | 14 | |
| 9 | −pub use commit::Commit; | |
| 10 | 15 | use filebuffer::FileBuffer; |
| 11 | 16 | use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE; |
| 12 | 17 | use std::{ |
| @@ -22,7 +27,7 @@ const SIGNATURE: &[u8] = b"CGPH"; · 9 unmodified lines | ||
| 22 | 27 | /// A single commit-graph file. |
| 23 | 28 | /// |
| 24 | 29 | /// 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]. | |
| 26 | 31 | pub struct File { |
| 27 | 32 | base_graph_count: u8, |
| 28 | 33 | base_graphs_list_offset: Option<usize>, |
| @@ -39,8 +44,8 @@ pub struct File { · 10 unmodified lines | ||
| 39 | 44 | /// Commits within a graph file are sorted in lexicographical order by OID; a commit's lexigraphical position |
| 40 | 45 | /// is its position in this ordering. If a commit graph spans multiple files, each file's commits |
| 41 | 46 | /// 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 | |
| 44 | 49 | /// positions, distinct types are used for each. |
| 45 | 50 | #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] |
| 46 | 51 | pub struct Position(pub u32); |