summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-04-05 21:55:59 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2020-11-27 11:09:21 +0000
commit055fbf6d904a7799cb42293da588082b6dca84a4 (patch)
tree5c7dba0963c5102195c2e93e5e9b87105f1eeed2 /src
parent59f46913c0b53f2bb45a0f9dc9d390de6a4d7697 (diff)
downloadlibgit2-055fbf6d904a7799cb42293da588082b6dca84a4.tar.gz
revert: use GIT_ASSERT
Diffstat (limited to 'src')
-rw-r--r--src/revert.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/revert.c b/src/revert.c
index b84bc7d79..683f0d70d 100644
--- a/src/revert.c
+++ b/src/revert.c
@@ -129,7 +129,10 @@ int git_revert_commit(
git_tree *parent_tree = NULL, *our_tree = NULL, *revert_tree = NULL;
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 (!mainline)
@@ -180,7 +183,8 @@ int git_revert(
git_indexwriter indexwriter = GIT_INDEXWRITER_INIT;
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");