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
4b093e75
Commit
4b093e75
authored
Apr 05, 2020
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pathspec: use GIT_ASSERT
parent
16b1a756
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/pathspec.c
+6
-5
No files found.
src/pathspec.c
View file @
4b093e75
...
...
@@ -289,7 +289,8 @@ int git_pathspec_matches_path(
bool
no_fnmatch
=
(
flags
&
GIT_PATHSPEC_NO_GLOB
)
!=
0
;
bool
casefold
=
(
flags
&
GIT_PATHSPEC_IGNORE_CASE
)
!=
0
;
assert
(
ps
&&
path
);
GIT_ASSERT_ARG
(
ps
);
GIT_ASSERT_ARG
(
path
);
return
(
0
!=
git_pathspec__match
(
&
ps
->
pathspec
,
path
,
no_fnmatch
,
casefold
,
NULL
,
NULL
));
...
...
@@ -526,7 +527,7 @@ int git_pathspec_match_workdir(
git_iterator_options
iter_opts
=
GIT_ITERATOR_OPTIONS_INIT
;
int
error
=
0
;
assert
(
repo
);
GIT_ASSERT_ARG
(
repo
);
iter_opts
.
flags
=
pathspec_match_iter_flags
(
flags
);
...
...
@@ -548,7 +549,7 @@ int git_pathspec_match_index(
git_iterator_options
iter_opts
=
GIT_ITERATOR_OPTIONS_INIT
;
int
error
=
0
;
assert
(
index
);
GIT_ASSERT_ARG
(
index
);
iter_opts
.
flags
=
pathspec_match_iter_flags
(
flags
);
...
...
@@ -570,7 +571,7 @@ int git_pathspec_match_tree(
git_iterator_options
iter_opts
=
GIT_ITERATOR_OPTIONS_INIT
;
int
error
=
0
;
assert
(
tree
);
GIT_ASSERT_ARG
(
tree
);
iter_opts
.
flags
=
pathspec_match_iter_flags
(
flags
);
...
...
@@ -598,7 +599,7 @@ int git_pathspec_match_diff(
const
git_diff_delta
*
delta
,
**
match
;
git_bitvec
used_patterns
;
assert
(
diff
);
GIT_ASSERT_ARG
(
diff
);
if
(
git_bitvec_init
(
&
used_patterns
,
patterns
->
length
)
<
0
)
return
-
1
;
...
...
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