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
21b1e015
Commit
21b1e015
authored
Dec 08, 2015
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3539 from libgit2/typedef-submodule-cb
Use a typedef for the submodule_foreach callback.
parents
d698929c
ab273821
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
include/git2/submodule.h
+12
-1
src/submodule.c
+1
-1
No files found.
include/git2/submodule.h
View file @
21b1e015
...
...
@@ -108,6 +108,17 @@ typedef enum {
GIT_SUBMODULE_STATUS_WD_UNTRACKED)) != 0)
/**
* Function pointer to receive each submodule
*
* @param sm git_submodule currently being visited
* @param name name of the submodule
* @param payload value you passed to the foreach function as payload
* @return 0 on success or error code
*/
typedef
int
(
*
git_submodule_cb
)(
git_submodule
*
sm
,
const
char
*
name
,
void
*
payload
);
/**
* Submodule update options structure
*
* Use the GIT_SUBMODULE_UPDATE_OPTIONS_INIT to get the default settings,
...
...
@@ -239,7 +250,7 @@ GIT_EXTERN(void) git_submodule_free(git_submodule *submodule);
*/
GIT_EXTERN
(
int
)
git_submodule_foreach
(
git_repository
*
repo
,
int
(
*
callback
)(
git_submodule
*
sm
,
const
char
*
name
,
void
*
payload
)
,
git_submodule_cb
callback
,
void
*
payload
);
/**
...
...
src/submodule.c
View file @
21b1e015
...
...
@@ -495,7 +495,7 @@ cleanup:
int
git_submodule_foreach
(
git_repository
*
repo
,
int
(
*
callback
)(
git_submodule
*
sm
,
const
char
*
name
,
void
*
payload
)
,
git_submodule_cb
callback
,
void
*
payload
)
{
git_vector
snapshot
=
GIT_VECTOR_INIT
;
...
...
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