Commit f16f2927879c9a2193d575f655ecd110508313df

Edward Thomson 2020-04-05T17:09:59

merge_file: use GIT_ASSERT

diff --git a/src/merge_file.c b/src/merge_file.c
index 755340f..bfa3ec5 100644
--- a/src/merge_file.c
+++ b/src/merge_file.c
@@ -36,7 +36,10 @@ static int merge_file_input_from_index(
 {
 	int error = 0;
 
-	assert(input_out && odb_object_out && odb && entry);
+	GIT_ASSERT_ARG(input_out);
+	GIT_ASSERT_ARG(odb_object_out);
+	GIT_ASSERT_ARG(odb);
+	GIT_ASSERT_ARG(entry);
 
 	if ((error = git_odb_read(odb_object_out, odb, &entry->id)) < 0)
 		goto done;
@@ -241,7 +244,9 @@ int git_merge_file(
 {
 	git_merge_file_input inputs[3] = { {0} };
 
-	assert(out && ours && theirs);
+	GIT_ASSERT_ARG(out);
+	GIT_ASSERT_ARG(ours);
+	GIT_ASSERT_ARG(theirs);
 
 	memset(out, 0x0, sizeof(git_merge_file_result));
 
@@ -268,7 +273,10 @@ int git_merge_file_from_index(
 	git_odb_object *odb_object[3] = { 0 };
 	int error = 0;
 
-	assert(out && repo && ours && theirs);
+	GIT_ASSERT_ARG(out);
+	GIT_ASSERT_ARG(repo);
+	GIT_ASSERT_ARG(ours);
+	GIT_ASSERT_ARG(theirs);
 
 	memset(out, 0x0, sizeof(git_merge_file_result));