Showing the changes to git-commitgraph/src/graph (2 of 60 files). Show all
Unified · Split
| @@ -2,7 +2,6 @@ use crate::{ · 1 unmodified line | ||
| 2 | 2 | file::{self, File}, |
| 3 | 3 | Graph, MAX_COMMITS, |
| 4 | 4 | }; |
| 5 | −use git_object::HashKind; | |
| 6 | 5 | use std::{ |
| 7 | 6 | convert::TryFrom, |
| 8 | 7 | io::{BufRead, BufReader}, |
| @@ -22,9 +21,9 @@ pub enum Error { · 13 unmodified lines | ||
| 22 | 21 | #[error("Commit-graph files mismatch: '{}' uses hash {hash1:?}, but '{}' uses hash {hash2:?}", .path1.display(), .path2.display())] |
| 23 | 22 | HashVersionMismatch { |
| 24 | 23 | path1: PathBuf, |
| 25 | − hash1: HashKind, | |
| 24 | + hash1: git_hash::Kind, | |
| 26 | 25 | path2: PathBuf, |
| 27 | − hash2: HashKind, | |
| 26 | + hash2: git_hash::Kind, | |
| 28 | 27 | }, |
| 29 | 28 | #[error("Did not find any files that look like commit graphs at '{}'", .0.display())] |
| 30 | 29 | InvalidPath(PathBuf), |
| @@ -3,7 +3,6 @@ use crate::{ · 2 unmodified lines | ||
| 3 | 3 | file::{self, commit}, |
| 4 | 4 | graph, Graph, GENERATION_NUMBER_MAX, |
| 5 | 5 | }; |
| 6 | −use git_object::owned; | |
| 7 | 6 | use std::{ |
| 8 | 7 | cmp::{max, min}, |
| 9 | 8 | collections::BTreeMap, |
| @@ -19,8 +18,8 @@ pub enum Error<E: std::error::Error + 'static> { · 9 unmodified lines | ||
| 19 | 18 | BaseGraphCount { actual: u8, expected: u8, path: PathBuf }, |
| 20 | 19 | #[error("'{}' base graph at index {index} should have ID {expected} but is {actual}", .path.display())] |
| 21 | 20 | BaseGraphId { |
| 22 | − actual: owned::Id, | |
| 23 | − expected: owned::Id, | |
| 21 | + actual: git_hash::Id, | |
| 22 | + expected: git_hash::Id, | |
| 24 | 23 | index: u8, |
| 25 | 24 | path: PathBuf, |
| 26 | 25 | }, |
| @@ -36,12 +35,16 @@ pub enum Error<E: std::error::Error + 'static> { · 9 unmodified lines | ||
| 36 | 35 | path: PathBuf, |
| 37 | 36 | }, |
| 38 | 37 | #[error("Commit {id}'s generation should be {expected} but is {actual}")] |
| 39 | − Generation { actual: u32, expected: u32, id: owned::Id }, | |
| 38 | + Generation { | |
| 39 | + actual: u32, | |
| 40 | + expected: u32, | |
| 41 | + id: git_hash::Id, | |
| 42 | + }, | |
| 40 | 43 | #[error( |
| 41 | 44 | "Commit {id} has parent position {parent_pos} that is out of range (should be in range 0-{max_valid_pos})" |
| 42 | 45 | )] |
| 43 | 46 | ParentOutOfRange { |
| 44 | − id: owned::Id, | |
| 47 | + id: git_hash::Id, | |
| 45 | 48 | max_valid_pos: graph::Position, |
| 46 | 49 | parent_pos: graph::Position, |
| 47 | 50 | }, |