class documentation
class PackIndex3(FilePackIndex):
Constructor: PackIndex3(filename, object_format, file, contents, ...)
Version 3 Pack Index file.
Supports variable hash sizes for SHA-1 (20 bytes) and SHA-256 (32 bytes).
| Method | __init__ |
Initialize a version 3 pack index. |
| Instance Variable | hash |
Undocumented |
| Instance Variable | hash |
Undocumented |
| Instance Variable | object |
Undocumented |
| Instance Variable | shortened |
Undocumented |
| Instance Variable | version |
Undocumented |
| Method | _unpack |
Unpack the crc32 checksum for the ith object from the index file. |
| Method | _unpack |
Unpack the i-th entry in the index file. |
| Method | _unpack |
Unpack the i-th name from the index file. |
| Method | _unpack |
Unpack the i-th object offset from the index file. |
| Instance Variable | _crc32 |
Undocumented |
| Instance Variable | _fan |
Undocumented |
| Instance Variable | _name |
Undocumented |
| Instance Variable | _pack |
Undocumented |
| Instance Variable | _pack |
Undocumented |
Inherited from FilePackIndex:
| Method | __eq__ |
Check equality with another FilePackIndex. |
| Method | __len__ |
Return the number of entries in this pack index. |
| Method | calculate |
Calculate the SHA1 checksum over this pack index. |
| Method | check |
Check that the stored checksum matches the actual checksum. |
| Method | close |
Close the underlying file and any mmap. |
| Method | get |
Return the SHA1 checksum stored for the corresponding packfile. |
| Method | get |
Return the SHA1 checksum stored for this index. |
| Method | iter |
Iterate over all SHA1s with the given prefix. |
| Method | iterentries |
Iterate over the entries in this pack index. |
| Method | object |
Return the offset in to the corresponding packfile for the object. |
| Property | path |
Return the path to this index file. |
| Method | _itersha |
Iterate over all SHA1s in the index. |
| Method | _object |
See object_offset. |
| Method | _read |
Read the fan-out table from the index. |
| Instance Variable | _contents |
Undocumented |
| Instance Variable | _file |
Undocumented |
| Instance Variable | _filename |
Undocumented |
| Instance Variable | _size |
Undocumented |
Inherited from PackIndex (via FilePackIndex):
| Method | __iter__ |
Iterate over the SHAs in this pack. |
| Method | __ne__ |
Check if this pack index is not equal to another. |
| Method | object |
Return the SHA1 corresponding to the index in the pack file. |
| Method | objects |
Return the hex SHA1 over all the shas of all objects in this pack. |
def __init__(self, filename:
str | os.PathLike[ str], object_format: ObjectFormat, file: IO[ bytes] | _GitFile | None = None, contents: bytes | None = None, size: int | None = None):
¶
overrides
dulwich.pack.FilePackIndex.__init__overrides
dulwich.pack.FilePackIndex._unpack_entryUnpack the i-th entry in the index file.
- Returns: Tuple with object name (SHA), offset in pack file and CRC32
- checksum (if known).