Git object store interfaces and implementation.
Class |
|
Object store interface. |
Class |
|
Object store implementation that uses a bucket store like S3 as backend. |
Class |
|
Git-style object store that exists on disk. |
Class |
|
Object store that keeps all objects in memory. |
Class |
|
Find the objects missing from another object store. |
Class |
|
Interface for iterating over objects. |
Class |
|
Graph walker that finds what commits are missing from an object store. |
Class |
|
ObjectIterator that works on top of an ObjectStore. |
Class |
|
Object store that can overlay multiple object stores. |
Class |
|
No class docstring; 1/2 property, 0/2 instance variable, 11/19 methods documented |
Function | commit |
Commit a specified set of changes to a tree structure. |
Function | read |
Yield the packs listed in a packs file. |
Function | tree |
Look up an object in a Git tree. |
Constant | INFODIR |
Undocumented |
Constant | PACK |
Undocumented |
Constant | PACKDIR |
Undocumented |
Function | _collect |
Collect SHA1s of files and directories for specified tree. |
Function | _split |
Split object id list into three lists with commit, tag, and other SHAs. |
Commit a specified set of changes to a tree structure.
This will apply a set of changes on top of an existing tree, storing new objects in object_store.
changes are a list of tuples with (path, mode, object_sha). Paths can be both blobs and trees. See the mode and object sha to None deletes the path.
This method works especially well if there are only a small number of changes to a big tree. For a large number of changes to a large tree, use e.g. commit_tree.
Returns: New tree root object
Parameters | |
object | Object store to store new objects in and retrieve old ones from. |
tree | Original tree root |
changes | changes to apply |
Look up an object in a Git tree.
Returns: A tuple of (mode, SHA) of the resulting path.
Parameters | |
lookup | Callback for retrieving object by SHA1 |
root | SHA1 of the root tree |
path | Path to lookup |
Collect SHA1s of files and directories for specified tree.
Parameters | |
obj | Object store to get objects by SHA from |
tree | tree reference to walk |
kset | set to fill with references to files and directories |
Split object id list into three lists with commit, tag, and other SHAs.
Commits referenced by tags are included into commits list as well. Only SHA1s known in this repository will get through, and unless ignore_unknown argument is True, KeyError is thrown for SHA1 missing in the repository
Returns: A tuple of (commits, tags, others) SHA1s
Parameters | |
obj | Object store to get objects by SHA1 from |
lst | Collection of commit and tag SHAs |
ignore | True to skip SHA1 missing in the repository silently. |