Commit a667ca82 by Arthur Schreiber

Change the git_branch_iterator_new and git_branch_next definitions to use git_branch_t.

parent aad5403f
...@@ -83,7 +83,7 @@ typedef struct git_branch_iterator git_branch_iterator; ...@@ -83,7 +83,7 @@ typedef struct git_branch_iterator git_branch_iterator;
GIT_EXTERN(int) git_branch_iterator_new( GIT_EXTERN(int) git_branch_iterator_new(
git_branch_iterator **out, git_branch_iterator **out,
git_repository *repo, git_repository *repo,
unsigned int list_flags); git_branch_t list_flags);
/** /**
* Retrieve the next branch from the iterator * Retrieve the next branch from the iterator
...@@ -93,7 +93,7 @@ GIT_EXTERN(int) git_branch_iterator_new( ...@@ -93,7 +93,7 @@ GIT_EXTERN(int) git_branch_iterator_new(
* @param iter the branch iterator * @param iter the branch iterator
* @return 0 on success, GIT_ITEROVER if there are no more branches or an error code. * @return 0 on success, GIT_ITEROVER if there are no more branches or an error code.
*/ */
GIT_EXTERN(int) git_branch_next(git_reference **out, unsigned int *out_type, git_branch_iterator *iter); GIT_EXTERN(int) git_branch_next(git_reference **out, git_branch_t *out_type, git_branch_iterator *iter);
/** /**
* Free a branch iterator * Free a branch iterator
......
...@@ -129,7 +129,7 @@ typedef struct { ...@@ -129,7 +129,7 @@ typedef struct {
unsigned int flags; unsigned int flags;
} branch_iter; } branch_iter;
int git_branch_next(git_reference **out, unsigned int *out_type, git_branch_iterator *_iter) int git_branch_next(git_reference **out, git_branch_t *out_type, git_branch_iterator *_iter)
{ {
branch_iter *iter = (branch_iter *) _iter; branch_iter *iter = (branch_iter *) _iter;
git_reference *ref; git_reference *ref;
...@@ -159,7 +159,7 @@ int git_branch_next(git_reference **out, unsigned int *out_type, git_branch_iter ...@@ -159,7 +159,7 @@ int git_branch_next(git_reference **out, unsigned int *out_type, git_branch_iter
int git_branch_iterator_new( int git_branch_iterator_new(
git_branch_iterator **out, git_branch_iterator **out,
git_repository *repo, git_repository *repo,
unsigned int list_flags) git_branch_t list_flags)
{ {
branch_iter *iter; branch_iter *iter;
......
...@@ -182,7 +182,7 @@ static void verify_tracking_branches(git_remote *remote, expected_ref expected_r ...@@ -182,7 +182,7 @@ static void verify_tracking_branches(git_remote *remote, expected_ref expected_r
char *actual_ref; char *actual_ref;
git_oid oid; git_oid oid;
int failed = 0, error; int failed = 0, error;
unsigned int branch_type; git_branch_t branch_type;
git_reference *ref; git_reference *ref;
/* Get current remote branches */ /* Get current remote branches */
......
...@@ -33,7 +33,7 @@ static void assert_retrieval(unsigned int flags, unsigned int expected_count) ...@@ -33,7 +33,7 @@ static void assert_retrieval(unsigned int flags, unsigned int expected_count)
git_branch_iterator *iter; git_branch_iterator *iter;
git_reference *ref; git_reference *ref;
int count = 0, error; int count = 0, error;
unsigned int type; git_branch_t type;
cl_git_pass(git_branch_iterator_new(&iter, repo, flags)); cl_git_pass(git_branch_iterator_new(&iter, repo, flags));
while ((error = git_branch_next(&ref, &type, iter)) == 0) { while ((error = git_branch_next(&ref, &type, iter)) == 0) {
...@@ -83,7 +83,7 @@ static void assert_branch_has_been_found(struct expectations *findings, const ch ...@@ -83,7 +83,7 @@ static void assert_branch_has_been_found(struct expectations *findings, const ch
static void contains_branches(struct expectations exp[], git_branch_iterator *iter) static void contains_branches(struct expectations exp[], git_branch_iterator *iter)
{ {
git_reference *ref; git_reference *ref;
unsigned int type; git_branch_t type;
int error, pos = 0; int error, pos = 0;
while ((error = git_branch_next(&ref, &type, iter)) == 0) { while ((error = git_branch_next(&ref, &type, iter)) == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment