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
45c53eb6
Commit
45c53eb6
authored
May 08, 2014
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use unsigned type for APIs with opt flag mask
parent
5269008c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
include/git2/filter.h
+2
-1
include/git2/sys/filter.h
+3
-3
src/filter.c
+4
-4
No files found.
include/git2/filter.h
View file @
45c53eb6
...
@@ -80,6 +80,7 @@ typedef struct git_filter_list git_filter_list;
...
@@ -80,6 +80,7 @@ typedef struct git_filter_list git_filter_list;
* @param blob The blob to which the filter will be applied (if known)
* @param blob The blob to which the filter will be applied (if known)
* @param path Relative path of the file to be filtered
* @param path Relative path of the file to be filtered
* @param mode Filtering direction (WT->ODB or ODB->WT)
* @param mode Filtering direction (WT->ODB or ODB->WT)
* @param options Combination of `git_filter_opt_t` flags
* @return 0 on success (which could still return NULL if no filters are
* @return 0 on success (which could still return NULL if no filters are
* needed for the requested file), <0 on error
* needed for the requested file), <0 on error
*/
*/
...
@@ -89,7 +90,7 @@ GIT_EXTERN(int) git_filter_list_load(
...
@@ -89,7 +90,7 @@ GIT_EXTERN(int) git_filter_list_load(
git_blob
*
blob
,
/* can be NULL */
git_blob
*
blob
,
/* can be NULL */
const
char
*
path
,
const
char
*
path
,
git_filter_mode_t
mode
,
git_filter_mode_t
mode
,
git_filter_opt
_t
options
);
uint32
_t
options
);
/**
/**
* Apply filter list to a data buffer.
* Apply filter list to a data buffer.
...
...
include/git2/sys/filter.h
View file @
45c53eb6
...
@@ -58,7 +58,7 @@ GIT_EXTERN(int) git_filter_list_new(
...
@@ -58,7 +58,7 @@ GIT_EXTERN(int) git_filter_list_new(
git_filter_list
**
out
,
git_filter_list
**
out
,
git_repository
*
repo
,
git_repository
*
repo
,
git_filter_mode_t
mode
,
git_filter_mode_t
mode
,
git_filter_opt
_t
options
);
uint32
_t
options
);
/**
/**
* Add a filter to a filter list with the given payload.
* Add a filter to a filter list with the given payload.
...
@@ -123,9 +123,9 @@ GIT_EXTERN(const git_oid *) git_filter_source_id(const git_filter_source *src);
...
@@ -123,9 +123,9 @@ GIT_EXTERN(const git_oid *) git_filter_source_id(const git_filter_source *src);
GIT_EXTERN
(
git_filter_mode_t
)
git_filter_source_mode
(
const
git_filter_source
*
src
);
GIT_EXTERN
(
git_filter_mode_t
)
git_filter_source_mode
(
const
git_filter_source
*
src
);
/**
/**
* Get the git_filter_opt_t options to be applied
* Get the
combination
git_filter_opt_t options to be applied
*/
*/
GIT_EXTERN
(
git_filter_opt
_t
)
git_filter_source_options
(
const
git_filter_source
*
src
);
GIT_EXTERN
(
uint32
_t
)
git_filter_source_options
(
const
git_filter_source
*
src
);
/*
/*
* struct git_filter
* struct git_filter
...
...
src/filter.c
View file @
45c53eb6
...
@@ -23,7 +23,7 @@ struct git_filter_source {
...
@@ -23,7 +23,7 @@ struct git_filter_source {
git_oid
oid
;
/* zero if unknown (which is likely) */
git_oid
oid
;
/* zero if unknown (which is likely) */
uint16_t
filemode
;
/* zero if unknown */
uint16_t
filemode
;
/* zero if unknown */
git_filter_mode_t
mode
;
git_filter_mode_t
mode
;
git_filter_opt_t
options
;
uint32_t
options
;
};
};
typedef
struct
{
typedef
struct
{
...
@@ -359,7 +359,7 @@ git_filter_mode_t git_filter_source_mode(const git_filter_source *src)
...
@@ -359,7 +359,7 @@ git_filter_mode_t git_filter_source_mode(const git_filter_source *src)
return
src
->
mode
;
return
src
->
mode
;
}
}
git_filter_opt
_t
git_filter_source_options
(
const
git_filter_source
*
src
)
uint32
_t
git_filter_source_options
(
const
git_filter_source
*
src
)
{
{
return
src
->
options
;
return
src
->
options
;
}
}
...
@@ -429,7 +429,7 @@ int git_filter_list_new(
...
@@ -429,7 +429,7 @@ int git_filter_list_new(
git_filter_list
**
out
,
git_filter_list
**
out
,
git_repository
*
repo
,
git_repository
*
repo
,
git_filter_mode_t
mode
,
git_filter_mode_t
mode
,
git_filter_opt
_t
options
)
uint32
_t
options
)
{
{
git_filter_source
src
=
{
0
};
git_filter_source
src
=
{
0
};
src
.
repo
=
repo
;
src
.
repo
=
repo
;
...
@@ -445,7 +445,7 @@ int git_filter_list_load(
...
@@ -445,7 +445,7 @@ int git_filter_list_load(
git_blob
*
blob
,
/* can be NULL */
git_blob
*
blob
,
/* can be NULL */
const
char
*
path
,
const
char
*
path
,
git_filter_mode_t
mode
,
git_filter_mode_t
mode
,
git_filter_opt
_t
options
)
uint32
_t
options
)
{
{
int
error
=
0
;
int
error
=
0
;
git_filter_list
*
fl
=
NULL
;
git_filter_list
*
fl
=
NULL
;
...
...
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