]> git.proxmox.com Git - libgit2.git/commit - src/branch.c
branch: move from foreach to an iterator
authorCarlos Martín Nieto <cmn@dwim.me>
Sat, 2 Nov 2013 13:07:02 +0000 (14:07 +0100)
committerVicent Marti <tanoku@gmail.com>
Tue, 5 Nov 2013 13:58:16 +0000 (14:58 +0100)
commit8ec889a45fded32bf8508f99d77ea666d0aacdd5
treee78e392f1c3d3f05cd1620a6cc3ffbe5c87f158b
parentb7fbfbb21f4248bf4103a2c13479bf65ba175f36
branch: move from foreach to an iterator

Create a git_branch_iterator type which is equivalent to the foreach but
lets us write loops instead of callbacks.

Since the introduction of git_reference_shorthand(), the added value of
passing the name is reduced.
include/git2/branch.h
src/branch.c
tests-clar/online/push.c
tests-clar/refs/branches/foreach.c [deleted file]
tests-clar/refs/branches/iterator.c [new file with mode: 0644]