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
d574de0e
Commit
d574de0e
authored
Nov 21, 2012
by
Russell Belfer
Committed by
Ben Straub
Nov 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API updates for status.h
parent
9daf2400
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
7 deletions
+20
-7
include/git2/status.h
+17
-4
src/status.c
+3
-3
No files found.
include/git2/status.h
View file @
d574de0e
...
...
@@ -47,6 +47,18 @@ typedef enum {
}
git_status_t
;
/**
* Function pointer to receive status on individual files
*
* `path` is the relative path to the file from the root of the repository.
*
* `status_flags` is a combination of `git_status_t` values that apply.
*
* `payload` is the value you passed to the foreach function as payload.
*/
typedef
int
(
*
git_status_cb
)(
const
char
*
path
,
unsigned
int
status_flags
,
void
*
payload
);
/**
* Gather file statuses and run a callback for each one.
*
* The callback is passed the path of the file, the status (a combination of
...
...
@@ -63,7 +75,7 @@ typedef enum {
*/
GIT_EXTERN
(
int
)
git_status_foreach
(
git_repository
*
repo
,
int
(
*
callback
)(
const
char
*
,
unsigned
int
,
void
*
)
,
git_status_cb
callback
,
void
*
payload
);
/**
...
...
@@ -146,9 +158,10 @@ typedef enum {
* `GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH` is specified in the flags.
*/
typedef
struct
{
unsigned
int
version
;
git_status_show_t
show
;
unsigned
int
flags
;
git_strarray
pathspec
;
unsigned
int
flags
;
git_strarray
pathspec
;
}
git_status_options
;
/**
...
...
@@ -168,7 +181,7 @@ typedef struct {
GIT_EXTERN
(
int
)
git_status_foreach_ext
(
git_repository
*
repo
,
const
git_status_options
*
opts
,
int
(
*
callback
)(
const
char
*
,
unsigned
int
,
void
*
)
,
git_status_cb
callback
,
void
*
payload
);
/**
...
...
src/status.c
View file @
d574de0e
...
...
@@ -78,7 +78,7 @@ static unsigned int workdir_delta2status(git_delta_t workdir_status)
}
typedef
struct
{
int
(
*
cb
)(
const
char
*
,
unsigned
int
,
void
*
)
;
git_status_cb
cb
;
void
*
payload
;
}
status_user_callback
;
...
...
@@ -104,7 +104,7 @@ static int status_invoke_cb(
int
git_status_foreach_ext
(
git_repository
*
repo
,
const
git_status_options
*
opts
,
int
(
*
cb
)(
const
char
*
,
unsigned
int
,
void
*
)
,
git_status_cb
cb
,
void
*
payload
)
{
int
err
=
0
;
...
...
@@ -178,7 +178,7 @@ cleanup:
int
git_status_foreach
(
git_repository
*
repo
,
int
(
*
callback
)(
const
char
*
,
unsigned
int
,
void
*
)
,
git_status_cb
callback
,
void
*
payload
)
{
git_status_options
opts
;
...
...
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