module documentation
Ref handling.
Class |
|
RefsContainer backed by a simple dict. |
Class |
|
Refs container that reads refs from disk. |
Class |
|
Refs container that reads refs from a info/refs file. |
Class |
|
A container for refs. |
Exception |
|
There is a loop between one or more symrefs. |
Function | check |
Check if a refname is correctly formatted. |
Function | is |
Undocumented |
Function | parse |
Parse a symref value. |
Function | read |
Undocumented |
Function | read |
Read a packed refs file. |
Function | read |
Read a packed refs file including peeled refs. |
Function | strip |
Remove all peeled refs |
Function | write |
Generate info refs. |
Function | write |
Write a packed refs file. |
Constant | ANNOTATED |
Undocumented |
Constant | BAD |
Undocumented |
Constant | HEADREF |
Undocumented |
Constant | LOCAL |
Undocumented |
Constant | LOCAL |
Undocumented |
Constant | SYMREF |
Undocumented |
Function | _import |
Undocumented |
Function | _set |
Set the default branch. |
Function | _set |
Undocumented |
Function | _set |
Undocumented |
Function | _split |
Split a single ref line into a tuple of SHA1 and name. |
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
Returns: True if refname is valid, False otherwise
Parameters | |
refname:Ref | The refname to check |
Read a packed refs file.
Returns: Iterator over tuples with SHA1s and ref names.
Parameters | |
f | file-like object to read from |
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 |
Write a packed refs file.
Parameters | |
f | empty file-like object to write to |
packed | dict of refname to sha of packed refs to write |
peeled | dict of refname to peeled value of sha |