mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-12 15:16:35 +00:00
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:
parent
1bcdcea3ef
commit
8a1b21ff73
1 changed files with 2 additions and 2 deletions
|
@ -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>,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue