From: Elijah Newren Date: Fri, 26 Jul 2019 15:52:57 GMT Subject: [PATCH v2 19/20] merge-recursive: be consistent with assert Message-ID: <20190726155258.28561-20-newren@gmail.com> In-Reply-To: <20190726155258.28561-1-newren@gmail.com> 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 --- merge-recursive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/merge-recursive.c b/merge-recursive.c index 49eb50c17b..f1e2658457 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1058,7 +1058,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 : -- 2.22.0.550.g71c37a0928.dirty