merge-recursive: be consistent with assert
In commit 8daec1df03de ("merge-recursive: switch from (oid,mode) pairs to a diff_filespec", 2019-04-05), an assertion on a->path && b->path was added for code readability to document that these both needed to be non-NULL at this point in the code. However, the subsequent lines also read o->path, so it should be included in the assert. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Aug 15, 2019 at 14:40 UTC
d8523ca1b90641be4bddcdfc50fbf3a1be34adae
1 file changed
+1
-1
merge-recursive.c
+1
-1
@@ -1043,7 +1043,7 @@ static int merge_3way(struct merge_options *opt,
1043
}
1044
}
1045
1046
- assert(a->path && b->path);
1046
+ assert(a->path && b->path && o->path);
1047
if (strcmp(a->path, b->path) ||
1048
(opt->ancestor != NULL && strcmp(a->path, o->path) != 0)) {
1049
base_name = opt->ancestor == NULL ? NULL :