History

Remove all public exports of git-hash types in git-object (#63)

Sebastian Thiel committed 5 years ago

Commit accf89d1 parent a3f281660 files · +262 −252Browse files

Showing the changes to git-commitgraph/src/graph (2 of 60 files). Show all

Unified · Split

2 files
  1. git-commitgraph/src/graph/init.rs +2 −3
  2. git-commitgraph/src/graph/verify.rs +8 −5
git-commitgraph/src/graph/init.rs+2−3
@@ -2,7 +2,6 @@ use crate::{ · 1 unmodified line
22 file::{self, File},
33 Graph, MAX_COMMITS,
44 };
5−use git_object::HashKind;
65 use std::{
76 convert::TryFrom,
87 io::{BufRead, BufReader},
@@ -22,9 +21,9 @@ pub enum Error { · 13 unmodified lines
2221 #[error("Commit-graph files mismatch: '{}' uses hash {hash1:?}, but '{}' uses hash {hash2:?}", .path1.display(), .path2.display())]
2322 HashVersionMismatch {
2423 path1: PathBuf,
25− hash1: HashKind,
24+ hash1: git_hash::Kind,
2625 path2: PathBuf,
27− hash2: HashKind,
26+ hash2: git_hash::Kind,
2827 },
2928 #[error("Did not find any files that look like commit graphs at '{}'", .0.display())]
3029 InvalidPath(PathBuf),
git-commitgraph/src/graph/verify.rs+8−5
@@ -3,7 +3,6 @@ use crate::{ · 2 unmodified lines
33 file::{self, commit},
44 graph, Graph, GENERATION_NUMBER_MAX,
55 };
6−use git_object::owned;
76 use std::{
87 cmp::{max, min},
98 collections::BTreeMap,
@@ -19,8 +18,8 @@ pub enum Error<E: std::error::Error + 'static> { · 9 unmodified lines
1918 BaseGraphCount { actual: u8, expected: u8, path: PathBuf },
2019 #[error("'{}' base graph at index {index} should have ID {expected} but is {actual}", .path.display())]
2120 BaseGraphId {
22− actual: owned::Id,
23− expected: owned::Id,
21+ actual: git_hash::Id,
22+ expected: git_hash::Id,
2423 index: u8,
2524 path: PathBuf,
2625 },
@@ -36,12 +35,16 @@ pub enum Error<E: std::error::Error + 'static> { · 9 unmodified lines
3635 path: PathBuf,
3736 },
3837 #[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+ },
4043 #[error(
4144 "Commit {id} has parent position {parent_pos} that is out of range (should be in range 0-{max_valid_pos})"
4245 )]
4346 ParentOutOfRange {
44− id: owned::Id,
47+ id: git_hash::Id,
4548 max_valid_pos: graph::Position,
4649 parent_pos: graph::Position,
4750 },