Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
3b2d14a7
Commit
3b2d14a7
authored
Apr 16, 2014
by
Vicent Marti
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2270 from csware/fix_git_branch_t_enum
Add GIT_BRANCH_LOCAL_AND_REMOTE to git_branch_t enum
parents
37ab5ecc
fa13ee2d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
include/git2/branch.h
+1
-1
include/git2/types.h
+1
-0
tests/refs/branches/iterator.c
+2
-2
No files found.
include/git2/branch.h
View file @
3b2d14a7
...
...
@@ -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
*/
...
...
include/git2/types.h
View file @
3b2d14a7
...
...
@@ -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. */
...
...
tests/refs/branches/iterator.c
View file @
3b2d14a7
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment