diff options
author | Vicent Marti <vicent@github.com> | 2014-04-16 18:51:38 +0200 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-04-16 18:51:38 +0200 |
commit | 3b2d14a7b83e0db272c84046f90b53b7b773180e (patch) | |
tree | a9498dda0e6972c60f6e283b8158bd3ba77cecd3 | |
parent | 37ab5ecc107118d5fa541cb42cc203649e549fd8 (diff) | |
parent | fa13ee2d7cfadf0b1d425708657d93aeae728f46 (diff) | |
download | libgit2-3b2d14a7b83e0db272c84046f90b53b7b773180e.tar.gz |
Merge pull request #2270 from csware/fix_git_branch_t_enum
Add GIT_BRANCH_LOCAL_AND_REMOTE to git_branch_t enum
-rw-r--r-- | include/git2/branch.h | 2 | ||||
-rw-r--r-- | include/git2/types.h | 1 | ||||
-rw-r--r-- | tests/refs/branches/iterator.c | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/include/git2/branch.h b/include/git2/branch.h index ad2a70b1f..f28410000 100644 --- a/include/git2/branch.h +++ b/include/git2/branch.h @@ -84,7 +84,7 @@ typedef struct git_branch_iterator git_branch_iterator; * @param repo Repository where to find the branches. * @param list_flags Filtering flags for the branch * listing. Valid values are GIT_BRANCH_LOCAL, GIT_BRANCH_REMOTE - * or a combination of the two. + * or GIT_BRANCH_ALL. * * @return 0 on success or an error code */ diff --git a/include/git2/types.h b/include/git2/types.h index 2229f6bf4..9db59b16b 100644 --- a/include/git2/types.h +++ b/include/git2/types.h @@ -193,6 +193,7 @@ typedef enum { typedef enum { GIT_BRANCH_LOCAL = 1, GIT_BRANCH_REMOTE = 2, + GIT_BRANCH_ALL = GIT_BRANCH_LOCAL|GIT_BRANCH_REMOTE, } git_branch_t; /** Valid modes for index and tree entries. */ diff --git a/tests/refs/branches/iterator.c b/tests/refs/branches/iterator.c index 29ca59aca..76b35a7d6 100644 --- a/tests/refs/branches/iterator.c +++ b/tests/refs/branches/iterator.c @@ -48,7 +48,7 @@ static void assert_retrieval(unsigned int flags, unsigned int expected_count) void test_refs_branches_iterator__retrieve_all_branches(void) { - assert_retrieval(GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE, 14); + assert_retrieval(GIT_BRANCH_ALL, 14); } void test_refs_branches_iterator__retrieve_remote_branches(void) @@ -139,7 +139,7 @@ void test_refs_branches_iterator__mix_of_packed_and_loose(void) r2 = cl_git_sandbox_init("testrepo2"); - cl_git_pass(git_branch_iterator_new(&iter, r2, GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE)); + cl_git_pass(git_branch_iterator_new(&iter, r2, GIT_BRANCH_ALL)); contains_branches(exp, iter); git_branch_iterator_free(iter); |