示例#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
 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);
 }