Skip to content

Commit 055fbf6

Browse files
committed
revert: use GIT_ASSERT
1 parent 59f4691 commit 055fbf6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/revert.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ int git_revert_commit(
129129
git_tree *parent_tree = NULL, *our_tree = NULL, *revert_tree = NULL;
130130
int parent = 0, error = 0;
131131

132-
assert(out && repo && revert_commit && our_commit);
132+
GIT_ASSERT_ARG(out);
133+
GIT_ASSERT_ARG(repo);
134+
GIT_ASSERT_ARG(revert_commit);
135+
GIT_ASSERT_ARG(our_commit);
133136

134137
if (git_commit_parentcount(revert_commit) > 1) {
135138
if (!mainline)
@@ -180,7 +183,8 @@ int git_revert(
180183
git_indexwriter indexwriter = GIT_INDEXWRITER_INIT;
181184
int error;
182185

183-
assert(repo && commit);
186+
GIT_ASSERT_ARG(repo);
187+
GIT_ASSERT_ARG(commit);
184188

185189
GIT_ERROR_CHECK_VERSION(given_opts, GIT_REVERT_OPTIONS_VERSION, "git_revert_options");
186190

0 commit comments

Comments
 (0)