ok/jj
1
0
Fork 0
forked from mirrors/jj

backend: implement equality for commits and trees

It can be useful in tests to be able to compare two commits or
trees. Most other structs already implement equality.
This commit is contained in:
Martin von Zweigbergk 2023-01-20 11:40:16 -08:00 committed by Martin von Zweigbergk
parent 1bcdcea3ef
commit 8a1b21ff73

View file

@ -138,7 +138,7 @@ content_hash! {
}
content_hash! {
#[derive(Debug, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct Commit {
pub parents: Vec<CommitId>,
pub predecessors: Vec<CommitId>,
@ -291,7 +291,7 @@ impl<'a> Iterator for TreeEntriesNonRecursiveIterator<'a> {
}
content_hash! {
#[derive(Default, Debug, Clone)]
#[derive(Default, PartialEq, Eq, Debug, Clone)]
pub struct Tree {
entries: BTreeMap<RepoPathComponent, TreeValue>,
}