readCommit(parent, tree);
}
//read objects from the given commit and put them into the index
for (Map.Entry<String, IdMap> e : c.getObjects().entrySet()) {
IdMap m = getObjects(e.getKey());
IdSet o = getOIDs(e.getKey());
IdMapIterator it = e.getValue().iterator();
while (it.hasNext()) {
it.advance();
if (it.value() < 0) {
//deleted object
long prev = m.get(it.key());
if (prev != 0) {
m.remove(it.key());
o.remove(prev);
}
} else {
long prev = m.put(it.key(), it.value());
if (prev != 0) {
//overwrite object with new value
o.remove(prev);
}
o.add(it.value());