/// <exception cref="System.IO.IOException"></exception> private void ResolveDeltas(PackedObjectInfo oe, ProgressMonitor progress) { PackParser.UnresolvedDelta children = FirstChildOf(oe); if (children == null) { return; } PackParser.DeltaVisit visit = new PackParser.DeltaVisit(); visit.nextChild = children; PackParser.ObjectTypeAndSize info = OpenDatabase(oe, new PackParser.ObjectTypeAndSize ()); switch (info.type) { case Constants.OBJ_COMMIT: case Constants.OBJ_TREE: case Constants.OBJ_BLOB: case Constants.OBJ_TAG: { visit.data = InflateAndReturn(PackParser.Source.DATABASE, info.size); visit.id = oe; break; } default: { throw new IOException(MessageFormat.Format(JGitText.Get().unknownObjectType, Sharpen.Extensions.ValueOf (info.type))); } } if (!CheckCRC(oe.GetCRC())) { throw new IOException(MessageFormat.Format(JGitText.Get().corruptionDetectedReReadingAt , Sharpen.Extensions.ValueOf(oe.GetOffset()))); } ResolveDeltas(visit.Next(), info.type, info, progress); }
/// <exception cref="System.IO.IOException"></exception> private void ResolveDeltas(PackedObjectInfo oe) { int oldCRC = oe.GetCRC(); if (baseById.Get(oe) != null || baseByPos.ContainsKey(oe.GetOffset())) { ResolveDeltas(oe.GetOffset(), oldCRC, Constants.OBJ_BAD, null, oe); } }