summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-11-05 12:26:41 -0800
committerCarlos Martín Nieto <cmn@dwim.me>2013-11-05 12:26:41 -0800
commita8baf4b16058846eb56afaa1faea04fa41c4a4d4 (patch)
treea617009801fd27b618b87bbee77e17361124c63e
parent8adea28ae950e21d3579c0e7911567be4951c4c6 (diff)
parenta667ca8298193b3103c1dbdcb1f6c527e6e99eb2 (diff)
downloadlibgit2-a8baf4b16058846eb56afaa1faea04fa41c4a4d4.tar.gz
Merge pull request #1946 from arthurschreiber/change-branch-iterator-definition
Change the git_branch_iterator_new definition to use git_branch_t
-rw-r--r--include/git2/branch.h4
-rw-r--r--src/branch.c4
-rw-r--r--tests-clar/online/push.c2
-rw-r--r--tests-clar/refs/branches/iterator.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/include/git2/branch.h b/include/git2/branch.h
index b5e7d60ea..44d6fd9c3 100644
--- a/include/git2/branch.h
+++ b/include/git2/branch.h
@@ -83,7 +83,7 @@ typedef struct git_branch_iterator git_branch_iterator;
GIT_EXTERN(int) git_branch_iterator_new(
git_branch_iterator **out,
git_repository *repo,
- unsigned int list_flags);
+ git_branch_t list_flags);
/**
* Retrieve the next branch from the iterator
@@ -93,7 +93,7 @@ GIT_EXTERN(int) git_branch_iterator_new(
* @param iter the branch iterator
* @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
diff --git a/src/branch.c b/src/branch.c
index 4660f00b7..95b3fd980 100644
--- a/src/branch.c
+++ b/src/branch.c
@@ -129,7 +129,7 @@ typedef struct {
unsigned int flags;
} 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;
git_reference *ref;
@@ -159,7 +159,7 @@ int git_branch_next(git_reference **out, unsigned int *out_type, git_branch_iter
int git_branch_iterator_new(
git_branch_iterator **out,
git_repository *repo,
- unsigned int list_flags)
+ git_branch_t list_flags)
{
branch_iter *iter;
diff --git a/tests-clar/online/push.c b/tests-clar/online/push.c
index 320ecb71e..d9ffe8aa9 100644
--- a/tests-clar/online/push.c
+++ b/tests-clar/online/push.c
@@ -182,7 +182,7 @@ static void verify_tracking_branches(git_remote *remote, expected_ref expected_r
char *actual_ref;
git_oid oid;
int failed = 0, error;
- unsigned int branch_type;
+ git_branch_t branch_type;
git_reference *ref;
/* Get current remote branches */
diff --git a/tests-clar/refs/branches/iterator.c b/tests-clar/refs/branches/iterator.c
index fb2c1a19d..904c6a146 100644
--- a/tests-clar/refs/branches/iterator.c
+++ b/tests-clar/refs/branches/iterator.c
@@ -33,7 +33,7 @@ static void assert_retrieval(unsigned int flags, unsigned int expected_count)
git_branch_iterator *iter;
git_reference *ref;
int count = 0, error;
- unsigned int type;
+ git_branch_t type;
cl_git_pass(git_branch_iterator_new(&iter, repo, flags));
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
static void contains_branches(struct expectations exp[], git_branch_iterator *iter)
{
git_reference *ref;
- unsigned int type;
+ git_branch_t type;
int error, pos = 0;
while ((error = git_branch_next(&ref, &type, iter)) == 0) {