Skip to content

Commit d341cff

Browse files
committed
Fix documentation for Repository.listall_branches
Add a description of the possible flags and turn the "tuple" into a "list", as it had already happened in code and part of the documentation in aa5877e.
1 parent 22d1aef commit d341cff

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/repository.c

+8-3
Original file line numberDiff line numberDiff line change
@@ -936,10 +936,15 @@ Repository_listall_references(Repository *self, PyObject *args)
936936

937937

938938
PyDoc_STRVAR(Repository_listall_branches__doc__,
939-
"listall_branches([flags]) -> [str, ...]\n"
939+
"listall_branches([flag]) -> [str, ...]\n"
940940
"\n"
941-
"Return a tuple with all the branches in the repository.\n"
942-
"By default, it returns all local branches.");
941+
"Return a list with all the branches in the repository.\n"
942+
"\n"
943+
"The *flag* may be:\n"
944+
"\n"
945+
"- GIT_BRANCH_LOCAL - return all local branches (set by default)\n"
946+
"- GIT_BRANCH_REMOTE - return all remote-tracking branches\n"
947+
"- GIT_BRANCH_ALL - return local branches and remote-tracking branches");
943948

944949
PyObject *
945950
Repository_listall_branches(Repository *self, PyObject *args)

0 commit comments

Comments
 (0)