-
-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[commitgraph] Implement commit-graph-verify plumbing command. #26
Commits on Oct 11, 2020
-
[commitgraph] Stub out commit-graph-verify plumbing command.
Commit graphs are optional, so commit-graph plumbing is guarded by a `commitgraph` feature that is enabled by default.
Configuration menu - View commit details
-
Copy full SHA for aacf0f0 - Browse repository at this point
Copy the full SHA aacf0f0View commit details -
[commitgraph] Use
thiserror
instead ofquick_error
.It doesn't look like `quick_error` supports type parameters on error enums, and I want to use type parameters for verification errors.
Configuration menu - View commit details
-
Copy full SHA for c8b1f74 - Browse repository at this point
Copy the full SHA c8b1f74View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b738ac - Browse repository at this point
Copy the full SHA 1b738acView commit details -
[commitgraph] Add
Graph::at
constructor.This constructor tries to accept as many commit-graph-looking paths as possible, such as `.git/objects/info`, `.git/objects/info/commit-graph`, or `.git/objects/info/commit-graphs`.
Configuration menu - View commit details
-
Copy full SHA for a783052 - Browse repository at this point
Copy the full SHA a783052View commit details -
[commitgraph] Tweak
File::iter_base_graph_ids
implementation.* It doesn't use evil `as`. * It's a bit less code. * It should be a tiny bit faster. * It is slightly more strict in that it will panic if the base graphs list is not evenly divisible into hashes. The file parser's error checking should ensure that this panic never happens, but maybe maybe maybe...
Configuration menu - View commit details
-
Copy full SHA for 5b06780 - Browse repository at this point
Copy the full SHA 5b06780View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28f94b4 - Browse repository at this point
Copy the full SHA 28f94b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 701f33c - Browse repository at this point
Copy the full SHA 701f33cView commit details -
[commitgraph] Implement basic commit-graph file verification.
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 ```
Configuration menu - View commit details
-
Copy full SHA for 2571113 - Browse repository at this point
Copy the full SHA 2571113View commit details -
[commitgraph] Clean up
{file,graph}::verify::Error
types.Get rid of `file::verify::EitherError` in favor of having `graph::verify::Error` manually copy file errors into the graph error object. So: 1. `graph::verify::Error`'s `File` variant uses a dummy type parameter for its nested `file::verify::Error` value. This dummy type parameter is essentially a never type, as `graph::verify::Error::File(file::verify::Error::Processor(...))` is not valid. 2. `Graph::verify_integrity` calls `File::traverse` with its normal error type (`graph::verify::Error`) also serving as the processor's error type. 3. `Graph::traverse` propagates processor errors to its caller via `Error::Processor(err)`. 4. `Graph::verify_integrity` manually transcribes `file::verify::Error<T>` variants into `file::verify::Error<NeverType>` variants before embedding the file error into `graph::verify::Error::File` variants.
Configuration menu - View commit details
-
Copy full SHA for fa22cab - Browse repository at this point
Copy the full SHA fa22cabView commit details