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 a combination of the two.
0 on success or an error code