Commit 4b093e75 by Edward Thomson

pathspec: use GIT_ASSERT

parent 16b1a756
...@@ -289,7 +289,8 @@ int git_pathspec_matches_path( ...@@ -289,7 +289,8 @@ int git_pathspec_matches_path(
bool no_fnmatch = (flags & GIT_PATHSPEC_NO_GLOB) != 0; bool no_fnmatch = (flags & GIT_PATHSPEC_NO_GLOB) != 0;
bool casefold = (flags & GIT_PATHSPEC_IGNORE_CASE) != 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( return (0 != git_pathspec__match(
&ps->pathspec, path, no_fnmatch, casefold, NULL, NULL)); &ps->pathspec, path, no_fnmatch, casefold, NULL, NULL));
...@@ -526,7 +527,7 @@ int git_pathspec_match_workdir( ...@@ -526,7 +527,7 @@ int git_pathspec_match_workdir(
git_iterator_options iter_opts = GIT_ITERATOR_OPTIONS_INIT; git_iterator_options iter_opts = GIT_ITERATOR_OPTIONS_INIT;
int error = 0; int error = 0;
assert(repo); GIT_ASSERT_ARG(repo);
iter_opts.flags = pathspec_match_iter_flags(flags); iter_opts.flags = pathspec_match_iter_flags(flags);
...@@ -548,7 +549,7 @@ int git_pathspec_match_index( ...@@ -548,7 +549,7 @@ int git_pathspec_match_index(
git_iterator_options iter_opts = GIT_ITERATOR_OPTIONS_INIT; git_iterator_options iter_opts = GIT_ITERATOR_OPTIONS_INIT;
int error = 0; int error = 0;
assert(index); GIT_ASSERT_ARG(index);
iter_opts.flags = pathspec_match_iter_flags(flags); iter_opts.flags = pathspec_match_iter_flags(flags);
...@@ -570,7 +571,7 @@ int git_pathspec_match_tree( ...@@ -570,7 +571,7 @@ int git_pathspec_match_tree(
git_iterator_options iter_opts = GIT_ITERATOR_OPTIONS_INIT; git_iterator_options iter_opts = GIT_ITERATOR_OPTIONS_INIT;
int error = 0; int error = 0;
assert(tree); GIT_ASSERT_ARG(tree);
iter_opts.flags = pathspec_match_iter_flags(flags); iter_opts.flags = pathspec_match_iter_flags(flags);
...@@ -598,7 +599,7 @@ int git_pathspec_match_diff( ...@@ -598,7 +599,7 @@ int git_pathspec_match_diff(
const git_diff_delta *delta, **match; const git_diff_delta *delta, **match;
git_bitvec used_patterns; git_bitvec used_patterns;
assert(diff); GIT_ASSERT_ARG(diff);
if (git_bitvec_init(&used_patterns, patterns->length) < 0) if (git_bitvec_init(&used_patterns, patterns->length) < 0)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment