Browse Source
When comparing a DirCache and a WorkingTree using ANY_DIFF we sometimes didn't recursive into a subtree of both sides gave us zeroId() back for the identity of a subtree. This happens when the DirCache doesn't have a valid cache tree for the subtree, as then it uses zeroId() for the ObjectId of the subtree, which then appears to be equal to the zeroId() of the WorkingTreeIterator's subtree. We work around this by adding a hasId() method that returns true only if this iterator has a valid ObjectId. The idEquals method on TreeWalk than only performs a compare between two iterators if both iterators have a valid id. Change-Id: I695f7fafbeb452e8c0703a05c02921fae0822d3f Signed-off-by: Shawn O. Pearce <spearce@spearce.org>stable-0.9
Shawn O. Pearce
14 years ago
6 changed files with 32 additions and 6 deletions
Loading…
Reference in new issue