Create an iterator which loops over the requested branches.
the iterator
Repository where to find the branches.
Filtering flags for the branch listing. Valid values are GIT_BRANCH_LOCAL, GIT_BRANCH_REMOTE or GIT_BRANCH_ALL.
0 on success or an error code