dulwich.object_store
module documentationdulwich
Class | BaseObjectStore | Object store interface. |
Class | PackBasedObjectStore | No class docstring; 13/20 methods documented |
Class | DiskObjectStore | Git-style object store that exists on disk. |
Class | MemoryObjectStore | Object store that keeps all objects in memory. |
Class | ObjectIterator | Interface for iterating over objects. |
Class | ObjectStoreIterator | ObjectIterator that works on top of an ObjectStore. |
Function | tree_lookup_path | Look up an object in a Git tree. |
Class | MissingObjectFinder | Find the objects missing from another object store. |
Class | ObjectStoreGraphWalker | Graph walker that finds what commits are missing from an object store. |
Function | commit_tree_changes | Commit a specified set of changes to a tree structure. |
Class | OverlayObjectStore | Object store that can overlay multiple object stores. |
Function | read_packs_file | Yield the packs listed in a packs file. |
Function | _collect_filetree_revs | Collect SHA1s of files and directories for specified tree. |
Function | _split_commits_and_tags | Split object id list into three lists with commit, tag, and other SHAs. |
Parameters | lookup_obj | Callback for retrieving object by SHA1 |
root_sha | SHA1 of the root tree | |
path | Path to lookup | |
Returns | A tuple of (mode, SHA) of the resulting path. |
Parameters | obj_store | Object store to get objects by SHA from |
tree_sha | 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
Parameters | obj_store | Object store to get objects by SHA1 from |
lst | Collection of commit and tag SHAs | |
ignore_unknown | True to skip SHA1 missing in the repository silently. | |
Returns | A tuple of (commits, tags, others) SHA1s |
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.
Parameters | object_store | Object store to store new objects in and retrieve old ones from. |
tree | Original tree root | |
changes | changes to apply | |
Returns | New tree root object |