Closed
Description
Tree objects inherit the eq methods from BaseCommit,
which is only respecting the sha.
I think that is a design error. When a tree is made recursive by
tree2 = tree.recurse()
then tree2 is very different if there are subfolders.
But comparison still claims tree == tree2
, because the tree sha stays the same (from the top tree).
I propose to fix that for at least this case or remove it completely. Instead, let equality really compare
the structures. Equality on the sha values is tested better explicit than implicit.
As a workaround, tree.as_dict() == tree2.as_dict()
works correctly. But that was very confusing
until I found the simple reason.
Metadata
Metadata
Assignees
Labels
No labels