Commit 5d8b75fa by Edward Thomson

cherrypick: use GIT_ASSERT

parent 266f26ed
......@@ -126,7 +126,10 @@ int git_cherrypick_commit(
git_tree *parent_tree = NULL, *our_tree = NULL, *cherrypick_tree = NULL;
int parent = 0, error = 0;
assert(out && repo && cherrypick_commit && our_commit);
GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(cherrypick_commit);
GIT_ASSERT_ARG(our_commit);
if (git_commit_parentcount(cherrypick_commit) > 1) {
if (!mainline)
......@@ -177,7 +180,8 @@ int git_cherrypick(
git_indexwriter indexwriter = GIT_INDEXWRITER_INIT;
int error = 0;
assert(repo && commit);
GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(commit);
GIT_ERROR_CHECK_VERSION(given_opts, GIT_CHERRYPICK_OPTIONS_VERSION, "git_cherrypick_options");
......
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