예제 #1
0
        internal PackReverseIndexV2(PackIndexV2 index)
        {
            Index = index;

              // Traverse index and build reverse-version
              offsets = new int[Index.NumberOfObjects];
              objectList = new int[Index.NumberOfObjects];

              int indexCount = 0;
              foreach (PackIndexEntry entry in Index)
              {
            offsets[indexCount] = entry.Offset;
            indexCount++;
              }

              Array.Sort(offsets);

              indexCount = 0;
              foreach (PackIndexEntry entry in Index)
              {
            objectList[Array.BinarySearch(offsets, entry.Offset)] = indexCount;
            indexCount++;
              }
        }
예제 #2
0
파일: PackV2.cs 프로젝트: optionalg/dotgit
 internal PackV2(Repository repo, string path)
     : base(repo, path)
 {
     Index = new PackIndexV2(IndexFilePath);
     Pack  = new PackV2Pack(Repo, PackFilePath);
 }
예제 #3
0
파일: PackV2.cs 프로젝트: skinny/dotgit
 internal PackV2(Repository repo, string path)
     : base(repo, path)
 {
     Index = new PackIndexV2(IndexFilePath);
       Pack = new PackV2Pack(Repo, PackFilePath);
 }