diff options
author | Elijah Newren <newren@gmail.com> | 2019-08-16 00:40:30 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-08-16 22:47:20 +0300 |
commit | d8523ca1b90641be4bddcdfc50fbf3a1be34adae (patch) | |
tree | 1ceb825bf17d97e42d2638c60a4fefc6e963d4ce /merge-recursive.c | |
parent | 5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9 (diff) |
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>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 6b812d67e3..1d960fa64b 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -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 : |