1
0
mirror of https://github.com/git/git.git synced 2024-10-20 12:18:36 +02:00

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>
This commit is contained in:
Elijah Newren 2019-08-15 14:40:30 -07:00 committed by Junio C Hamano
parent 5fa0f5238b
commit d8523ca1b9

@ -1043,7 +1043,7 @@ static int merge_3way(struct merge_options *opt,
}
}
assert(a->path && b->path);
assert(a->path && b->path && o->path);
if (strcmp(a->path, b->path) ||
(opt->ancestor != NULL && strcmp(a->path, o->path) != 0)) {
base_name = opt->ancestor == NULL ? NULL :