dulwich.refs
module documentationdulwich
Function | parse_symref_value | Parse a symref value. |
Function | check_ref_format | Check if a refname is correctly formatted. |
Class | RefsContainer | A container for refs. |
Class | DictRefsContainer | RefsContainer backed by a simple dict. |
Class | InfoRefsContainer | Refs container that reads refs from a info/refs file. |
Class | DiskRefsContainer | Refs container that reads refs from disk. |
Function | read_packed_refs | Read a packed refs file. |
Function | read_packed_refs_with_peeled | Read a packed refs file including peeled refs. |
Function | write_packed_refs | Write a packed refs file. |
Function | read_info_refs | Undocumented |
Function | write_info_refs | Generate info refs. |
Function | is_local_branch | Undocumented |
Function | strip_peeled_refs | Remove all peeled refs |
Function | _split_ref_line | Split a single ref line into a tuple of SHA1 and name. |
Parameters | contents | Contents to parse |
Returns | Destination |
Check if a refname is correctly formatted.
Implements all the same rules as git-check-ref-format[1].
[1] http://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html
Parameters | refname | The refname to check |
Returns | True if refname is valid, False otherwise |
Parameters | f | file-like object to read from |
Returns | Iterator over tuples with SHA1s and ref names. |
Read a packed refs file including peeled refs.
Assumes the "# pack-refs with: peeled" line was already read. Yields tuples with ref names, SHA1s, and peeled SHA1s (or None).
Parameters | f | file-like object to read from, seek'ed to the second line |