Commit bd3c3db9b640c810519d1304c3e2b86ac4391eaf introduces a change which
has no test. This is in a critical section of code, as it manages the
index file. We need a regression test on it.
The commit fixes a data corruption caused by creating an EmptyTreeIterator
around a DirCacheIterator when the DCI is used in a TreeWalk with another
type of iterator and the other type of iterator dives into a subdirectory
for which the DCI has no matching entries. If you go deep enough, the
EmptyTreeIterator will overwrite large sections of the DCI path buffer with
"/////" (for example) and when the TreeWalk exits the subtree the DCI's
path is now bogus. This will cause unexpected behavior when the path
buffer of "a////b" is compared to the other iterator, a path buffer should
never contain the subsequence "//" in it.
Original issue reported on code.google.com by sop+code@google.com on 16 May 2009 at 2:51
Original issue reported on code.google.com by
sop+code@google.com
on 16 May 2009 at 2:51