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
eecc8050
Commit
eecc8050
authored
Nov 20, 2012
by
Russell Belfer
Committed by
Ben Straub
Nov 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update callback fn ptr for git_reference_foreach
As part of API review, use a typedef for the callback fn ptr.
parent
e120123e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
include/git2/refs.h
+7
-1
src/refs.c
+1
-1
No files found.
include/git2/refs.h
View file @
eecc8050
...
...
@@ -288,6 +288,8 @@ GIT_EXTERN(int) git_reference_packall(git_repository *repo);
*/
GIT_EXTERN
(
int
)
git_reference_list
(
git_strarray
*
array
,
git_repository
*
repo
,
unsigned
int
list_flags
);
typedef
int
(
*
git_reference_foreach_cb
)(
const
char
*
refname
,
void
*
payload
);
/**
* Perform a callback on each reference in the repository.
*
...
...
@@ -308,7 +310,11 @@ GIT_EXTERN(int) git_reference_list(git_strarray *array, git_repository *repo, un
* @param payload Additional data to pass to the callback
* @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/
GIT_EXTERN
(
int
)
git_reference_foreach
(
git_repository
*
repo
,
unsigned
int
list_flags
,
int
(
*
callback
)(
const
char
*
,
void
*
),
void
*
payload
);
GIT_EXTERN
(
int
)
git_reference_foreach
(
git_repository
*
repo
,
unsigned
int
list_flags
,
git_reference_foreach_cb
callback
,
void
*
payload
);
/**
* Check if a reference has been loaded from a packfile.
...
...
src/refs.c
View file @
eecc8050
...
...
@@ -1478,7 +1478,7 @@ int git_reference_packall(git_repository *repo)
int
git_reference_foreach
(
git_repository
*
repo
,
unsigned
int
list_flags
,
int
(
*
callback
)(
const
char
*
,
void
*
)
,
git_reference_foreach_cb
callback
,
void
*
payload
)
{
int
result
;
...
...
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