class documentation
A Git pack object.
Class Method | from |
Create a new pack object from callables to load pack data and index objects. |
Class Method | from |
Create a new pack object from pack data and index objects. |
Method | __contains__ |
Check whether this pack contains a particular SHA1. |
Method | __enter__ |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | __getitem__ |
Retrieve the specified SHA1. |
Method | __init__ |
Undocumented |
Method | __iter__ |
Iterate over all the sha1s of the objects in this pack. |
Method | __len__ |
Number of entries in this pack. |
Method | __repr__ |
Undocumented |
Method | check |
Check the integrity of this pack. |
Method | check |
Sanity check the length and checksum of the pack index and data. |
Method | close |
Undocumented |
Method | entries |
Yield entries summarizing the contents of this pack. |
Method | get |
Undocumented |
Method | get |
Get raw unresolved data for a SHA. |
Method | get |
Get the object for a ref SHA, only looking in this pack. |
Method | get |
Undocumented |
Method | iterobjects |
Iterate over the objects in this pack. |
Method | keep |
Add a .keep file for the pack, preventing git from garbage collecting it. |
Method | name |
The SHA over the SHAs of the objects in this pack. |
Method | pack |
Provide an iterable for use with write_pack_objects. |
Method | resolve |
Resolve an object, possibly resolving deltas when necessary. |
Method | sorted |
Return entries in this pack, sorted by SHA. |
Instance Variable | resolve |
Undocumented |
Property | data |
The pack data object being used. |
Property | index |
The index being used. |
Instance Variable | _basename |
Undocumented |
Instance Variable | _data |
Undocumented |
Instance Variable | _data |
Undocumented |
Instance Variable | _data |
Undocumented |
Instance Variable | _idx |
Undocumented |
Instance Variable | _idx |
Undocumented |
Instance Variable | _idx |
Undocumented |
Check the integrity of this pack.
Raises | |
ChecksumMismatch | if a checksum for the index or data is wrong |
Yield entries summarizing the contents of this pack.
Returns: iterator of tuples with (sha, offset, crc32)
Parameters | |
progress | Progress function, called with current and total object count. |
Get raw unresolved data for a SHA.
- Returns: Tuple with pack object type, delta base (if applicable),
- list of data chunks
Parameters | |
sha1 | SHA to return data for |
Get the object for a ref SHA, only looking in this pack.
Returns | |
Tuple[ | Undocumented |
Add a .keep file for the pack, preventing git from garbage collecting it.
Returns: The path of the .keep file, as a string.
Parameters | |
msg | A message written inside the .keep file; can be used later to determine whether or not a .keep file is obsolete. |
Provide an iterable for use with write_pack_objects.
- Returns: Object that can iterate over (object, path) tuples
- and provides __len__
Resolve an object, possibly resolving deltas when necessary.
Returns: Tuple with object type and contents.