The file format is specified at https://git-scm.com/docs/pack-format#_pack_rev_files_have_the_format.
| Modifier and Type | Field and Description |
|---|---|
| private final DataInput | |
| private int[] | |
| private final DigestInputStream | |
| private int | |
| pack-priv static final int | |
| pack-priv static final int | |
| private byte[] | |
| private PackIndex | |
| private final PackBitmapIndex. | packIndexSupplier
A lazy supplier for the corresponding PackIndex. |
| private static final int |
| Access | Constructor and Description |
|---|---|
| pack-priv | PackReverseIndexV1(DigestInputStream inputStream, long objectCount, PackBitmapIndex.
|
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| private int | |
| public long | findNextOffset(long
start offset of previous object (must be valid-existing
offset). offset, long maximum offset in a pack (returned when there is no next
offset). maxOffset)Implements org. Search for the next offset to the specified offset in this pack (reverse) index. |
| public ObjectId | findObject(long
start offset of object to find. offset)Implements org. Search for object id with the specified start offset in this pack (reverse) index. |
| public ObjectId | findObjectByPosition(int
the position of the object in the reverse index position)Implements org. Find the object that is in the given position in the reverse index. |
| private long | |
| public int | findPosition(long
the pack offset of the object offset)Implements org. Find the position in the reverse index of the object at the given pack offset. |
| private PackIndex | |
| private void | |
| private void | |
| public void | verifyPackChecksum(String
the path to display in event of a mismatch packFilePath)Implements org. Verify that the pack checksum found in the reverse index matches that from the pack file. |
| dataIn | back to summary |
|---|---|
| private final DataInput dataIn | |
| indexPositionsSortedByOffset | back to summary |
|---|---|
| private int[] indexPositionsSortedByOffset | |
| inputStream | back to summary |
|---|---|
| private final DigestInputStream inputStream | |
| objectCount | back to summary |
|---|---|
| private int objectCount | |
| OID_VERSION_SHA1 | back to summary |
|---|---|
| pack-priv static final int OID_VERSION_SHA1 | |
| OID_VERSION_SHA256 | back to summary |
|---|---|
| pack-priv static final int OID_VERSION_SHA256 | |
| packChecksum | back to summary |
|---|---|
| private byte[] packChecksum | |
| packIndex | back to summary |
|---|---|
| private PackIndex packIndex | |
| packIndexSupplier | back to summary |
|---|---|
| private final PackBitmapIndex. A lazy supplier for the corresponding PackIndex. The PackIndex is not needed during instantiation and parsing, only later when querying the reverse index. Allow lazy loading so that the parsing of the forward and reverse indices could happen in parallel. | |
| SHA1_BYTES | back to summary |
|---|---|
| private static final int SHA1_BYTES | |
| PackReverseIndexV1 | back to summary |
|---|---|
| pack-priv PackReverseIndexV1(DigestInputStream inputStream, long objectCount, PackBitmapIndex. | |
| binarySearchByOffset | back to summary |
|---|---|
| private int binarySearchByOffset(long wantedOffset) | |
| findForwardPositionByReversePosition | back to summary |
|---|---|
| private int findForwardPositionByReversePosition(int reversePosition) | |
| findNextOffset | back to summary |
|---|---|
| public long findNextOffset(long offset, long maxOffset) throws CorruptObjectException Implements org. Doc from org. Search for the next offset to the specified offset in this pack (reverse) index.
| |
| findObject | back to summary |
|---|---|
| public ObjectId findObject(long offset) Implements org. Doc from org. Search for object id with the specified start offset in this pack (reverse) index. | |
| findObjectByPosition | back to summary |
|---|---|
| public ObjectId findObjectByPosition(int position) Implements org. Doc from org. Find the object that is in the given position in the reverse index. | |
| findOffsetByReversePosition | back to summary |
|---|---|
| private long findOffsetByReversePosition(int position) | |
| findPosition | back to summary |
|---|---|
| public int findPosition(long offset) Implements org. Doc from org. Find the position in the reverse index of the object at the given pack offset.
| |
| getPackIndex | back to summary |
|---|---|
| private PackIndex getPackIndex() | |
| parseBody | back to summary |
|---|---|
| private void parseBody() throws IOException | |
| parseChecksums | back to summary |
|---|---|
| private void parseChecksums() throws IOException | |
| verifyPackChecksum | back to summary |
|---|---|
| public void verifyPackChecksum(String packFilePath) throws PackMismatchException Implements org. Doc from org. Verify that the pack checksum found in the reverse index matches that from the pack file.
| |