mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 20:29:27 +00:00
Merge pull request #2270 from csware/fix_git_branch_t_enum
Add GIT_BRANCH_LOCAL_AND_REMOTE to git_branch_t enum
This commit is contained in:
commit
3b2d14a7b8
@ -84,7 +84,7 @@ typedef struct git_branch_iterator git_branch_iterator;
|
|||||||
* @param repo Repository where to find the branches.
|
* @param repo Repository where to find the branches.
|
||||||
* @param list_flags Filtering flags for the branch
|
* @param list_flags Filtering flags for the branch
|
||||||
* listing. Valid values are GIT_BRANCH_LOCAL, GIT_BRANCH_REMOTE
|
* 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
|
* @return 0 on success or an error code
|
||||||
*/
|
*/
|
||||||
|
@ -193,6 +193,7 @@ typedef enum {
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
GIT_BRANCH_LOCAL = 1,
|
GIT_BRANCH_LOCAL = 1,
|
||||||
GIT_BRANCH_REMOTE = 2,
|
GIT_BRANCH_REMOTE = 2,
|
||||||
|
GIT_BRANCH_ALL = GIT_BRANCH_LOCAL|GIT_BRANCH_REMOTE,
|
||||||
} git_branch_t;
|
} git_branch_t;
|
||||||
|
|
||||||
/** Valid modes for index and tree entries. */
|
/** Valid modes for index and tree entries. */
|
||||||
|
@ -48,7 +48,7 @@ static void assert_retrieval(unsigned int flags, unsigned int expected_count)
|
|||||||
|
|
||||||
void test_refs_branches_iterator__retrieve_all_branches(void)
|
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)
|
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");
|
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);
|
contains_branches(exp, iter);
|
||||||
|
|
||||||
git_branch_iterator_free(iter);
|
git_branch_iterator_free(iter);
|
||||||
|
Loading…
Reference in New Issue
Block a user