Skip to content

Commit 15b8372

Browse files
committed
Also verify the index of the default workspace (#293)
Will need more work to deal with multi-workspace repositories
1 parent 1c22d76 commit 15b8372

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: gitoxide-core/src/repository.rs

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ pub mod verify {
5353
make_pack_lookup_cache: || git_repository::odb::pack::cache::Never,
5454
},
5555
)?;
56+
// TODO: make this work for indices in multiple workspaces, once we have workspace support
57+
if let Some(index) = repo.load_index().transpose()? {
58+
index.verify_integrity()?;
59+
index.verify_entries()?;
60+
index.verify_extensions()?;
61+
}
5662
match output_statistics {
5763
Some(OutputFormat::Human) => writeln!(out, "Human output is currently unsupported, use JSON instead")?,
5864
#[cfg(feature = "serde1")]

0 commit comments

Comments
 (0)