Skip to content

Commit b37c3a9

Browse files
refactor
- add object-hash test Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
1 parent 9af801f commit b37c3a9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

gix-commitgraph/tests/commitgraph.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ pub fn graph_and_expected_named(
8181
let expected = inspect_refs(&repo_dir, refs);
8282
let cg =
8383
Graph::from_info_dir(&repo_dir.join(".git").join("objects").join("info")).expect("graph present and valid");
84+
let object_hash = cg.object_hash();
85+
if let Some(any_ref) = expected.values().next() {
86+
assert_eq!(
87+
object_hash,
88+
any_ref.id().kind(),
89+
"graph hash kind should match fixture object IDs"
90+
);
91+
}
8492
(cg, expected)
8593
}
8694

0 commit comments

Comments
 (0)