Correct thin pack completion in IndexPack to handle some bundles
Recently I saw a bundle with a chain of deltas to base objects as
A->B->C, where A was the delta depending on the base B. In this
pack all of the objects used OBJ_REF_DELTA to link to their base
and C was not in the pack (it was assumed to be in the repository).
Because of the ordering of the ObjectIds for B and C jgit tried to
resolve A's delta base by pulling from the repository, as B was not
found in the pack file. The reason B was not found was because it
was waiting in the queue (to be processed next) and we did not know
what B's ObjectId was.
By skipping objects whose ObjectLoader's aren't found we should be
able to resolve those objects later when their delta base does get
resolved in this pack. However by the end of of this loop we must
have no more objects depending on something by ObjectId, as that is
an indication that the local repository is missing the objects we
must have to complete this thin pack.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>