Commit 055fbf6d by Edward Thomson

revert: use GIT_ASSERT

parent 59f46913
...@@ -129,7 +129,10 @@ int git_revert_commit( ...@@ -129,7 +129,10 @@ int git_revert_commit(
git_tree *parent_tree = NULL, *our_tree = NULL, *revert_tree = NULL; git_tree *parent_tree = NULL, *our_tree = NULL, *revert_tree = NULL;
int parent = 0, error = 0; int parent = 0, error = 0;
assert(out && repo && revert_commit && our_commit); GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(revert_commit);
GIT_ASSERT_ARG(our_commit);
if (git_commit_parentcount(revert_commit) > 1) { if (git_commit_parentcount(revert_commit) > 1) {
if (!mainline) if (!mainline)
...@@ -180,7 +183,8 @@ int git_revert( ...@@ -180,7 +183,8 @@ int git_revert(
git_indexwriter indexwriter = GIT_INDEXWRITER_INIT; git_indexwriter indexwriter = GIT_INDEXWRITER_INIT;
int error; int error;
assert(repo && commit); GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(commit);
GIT_ERROR_CHECK_VERSION(given_opts, GIT_REVERT_OPTIONS_VERSION, "git_revert_options"); GIT_ERROR_CHECK_VERSION(given_opts, GIT_REVERT_OPTIONS_VERSION, "git_revert_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