Ref handling.
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.
def parse_symref_value(contents):
Parse a symref value.
ParameterscontentsContents to parse
ReturnsDestination
def check_ref_format(refname):

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

ParametersrefnameThe refname to check
ReturnsTrue if refname is valid, False otherwise
def _split_ref_line(line):
Split a single ref line into a tuple of SHA1 and name.
def read_packed_refs(f):
Read a packed refs file.
Parametersffile-like object to read from
ReturnsIterator over tuples with SHA1s and ref names.
def read_packed_refs_with_peeled(f):

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).

Parametersffile-like object to read from, seek'ed to the second line
def write_packed_refs(f, packed_refs, peeled_refs=None):
Write a packed refs file.
Parametersfempty file-like object to write to
packed_refsdict of refname to sha of packed refs to write
peeled_refsdict of refname to peeled value of sha
def read_info_refs(f):
Undocumented
def write_info_refs(refs, store):
Generate info refs.
def is_local_branch(x):
Undocumented
def strip_peeled_refs(refs):
Remove all peeled refs
API Documentation for Dulwich, generated by pydoctor at 2018-11-17 19:05:54.