dulwich.objects
module documentationdulwich
Function | S_ISGITLINK | Check if a mode indicates a submodule. |
Function | sha_to_hex | Takes a string and returns the hex of the sha within |
Function | hex_to_sha | Takes a hex sha and returns a binary sha |
Function | valid_hexsha | Undocumented |
Function | hex_to_filename | Takes a hex sha and returns its filename relative to the given path. |
Function | filename_to_hex | Takes an object filename and returns its corresponding hex sha. |
Function | object_header | Return an object header for the given numeric type and text length. |
Function | serializable_property | A property that helps tracking whether serialization is necessary. |
Function | object_class | Get the object class corresponding to the given type. |
Function | check_hexsha | Check if a string is a valid hex sha string. |
Function | check_identity | Check if the specified identity is valid. |
Function | check_time | Check if the specified time is not prone to overflow error. |
Function | git_line | Formats items into a space separated line. |
Class | FixedSha | SHA object that behaves like hashlib's but is given a fixed value. |
Class | ShaFile | A git SHA file. |
Class | Blob | A Git Blob object. |
Class | Tag | A Git Tag object. |
Class | TreeEntry | Named tuple encapsulating a single tree entry. |
Function | parse_tree | Parse a tree text. |
Function | serialize_tree | Serialize the items in a tree to a text. |
Function | sorted_tree_items | Iterate over a tree entries dictionary. |
Function | key_entry | Sort key for tree entry. |
Function | key_entry_name_order | Sort key for tree entry in name order. |
Function | pretty_format_tree_entry | Pretty format tree entry. |
Class | Tree | A Git tree object |
Function | parse_timezone | Parse a timezone text fragment (e.g. '+0100'). |
Function | format_timezone | Format a timezone for Git serialization. |
Function | parse_time_entry | Parse time entry behavior |
Function | parse_commit | Parse a commit object from chunks. |
Class | Commit | A git commit object |
Function | _decompress | Undocumented |
Function | _parse_message | Parse a message with a list of fields and a body. |
Parameters | type | Either a type name string or a numeric type. |
Returns | The ShaFile subclass corresponding to the given type, or None if type is not a valid type name/number. |
Parameters | hex | Hex string to check |
error_msg | Error message to use in exception | |
Raises | ObjectFormatException | Raised when the string is not valid |
Check if the specified identity is valid.
This will raise an exception if the identity is not valid.
Parameters | identity | Identity string |
error_msg | Error message to use in exception |
Check if the specified time is not prone to overflow error.
This will raise an exception if the time is not valid.
Parameters | time_info | author/committer/tagger info |
Parameters | chunks | the raw chunks of the tag or commit object. |
Returns | iterator of tuples of (field, value), one per header line, in the order read from the text, possibly including duplicates. Includes a field named None for the freeform tag/commit text. |
Parameters | text | Serialized text to parse |
Returns | iterator of tuples of (name, mode, sha) | |
Raises | ObjectFormatException | if the object was malformed in some way |
Parameters | items | Sorted iterable over (name, mode, sha) tuples |
Returns | Serialized tree text as chunks |
Parameters | name_order | If True, iterate entries in order of their name. If False, iterate entries in tree order, that is, treat subtree entries as having '/' appended. |
entries | Dictionary mapping names to (mode, sha) tuples | |
Returns | Iterator over (name, mode, hexsha) |
Parameters | name | Name of the directory entry |
mode | Mode of entry | |
hexsha | Hexsha of the referenced object | |
Returns | string describing the tree entry |
Parameters | text | Text to parse. |
Returns | Tuple with timezone as seconds difference to UTC and a boolean indicating whether this was a UTC timezone prefixed with a negative sign (-0000). |
Parameters | offset | Timezone offset as seconds difference to UTC |
unnecessary_negative_timezone | Whether to use a minus sign for UTC or positive timezones (-0000 and --700 rather than +0000 / +0700). |