Missing features: 1. It operates on commit-graph files only, so it doesn't verify that commit-graph data matches `git-odb` data. 2. No progress reporting or parallelization. This shouldn't be needed until until we need to check against `git-odb` data. Example output for Linux repo: ``` $ time ./target/release/gixp commit-graph-verify -s ~/src/linux/.git/objects/info number of commits with the given number of parents 0: 4 1: 878988 2: 67800 3: 652 4: 408 5: 382 6: 454 7: 95 8: 65 9: 47 10: 25 11: 26 12: 14 13: 4 14: 3 18: 1 19: 1 20: 1 21: 1 24: 1 27: 1 30: 1 32: 1 66: 1 ->: 948976 longest path length between two commits: 160521 real 0m0.196s user 0m0.180s sys 0m0.016s ```
Showing the changes to git-commitgraph/src/file/commit.rs (1 of 19 files). Show all
Unified · Split
| @@ -90,6 +90,10 @@ impl<'a> Commit<'a> { · 89 unmodified lines | |||
| 90 | self.iter_parents().next().transpose() | 90 | self.iter_parents().next().transpose() |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | pub fn position(&self) -> file::Position { | ||
| 94 | self.pos | ||
| 95 | } | ||
| 96 | |||
| 93 | // Allow the return value to outlive this Commit object, as it only needs to be bound by the | 97 | // Allow the return value to outlive this Commit object, as it only needs to be bound by the |
| 94 | // lifetime of the parent file. | 98 | // lifetime of the parent file. |
| 95 | pub fn root_tree_id<'b>(&'b self) -> borrowed::Id<'a> | 99 | pub fn root_tree_id<'b>(&'b self) -> borrowed::Id<'a> |