The Index uses an {@link StagingDatabase object database} as storage for the staged changes. Thisallows for really large operations not to eat up too much heap, and also works better and allows for easier implementation of operations that need to manipulate the index.
The Index database is a composite of its own ObjectDatabase and the repository's. Object look ups against the index first search on the index db, and if not found defer to the repository object db.
Internally, finding out what changes are unstaged is a matter of comparing (through a diff tree walk) the working tree and the staged changes tree. And finding out what changes are staged to be committed is performed through a diff tree walk comparing the staged changes tree and the repository's head tree.
|
|