diff options
| author | Elijah Newren <newren@gmail.com> | 2025-03-19 16:22:58 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-03-21 03:32:10 -0700 |
| commit | 5633aa3af1282cad5161174f17867399e58b2a54 (patch) | |
| tree | c48ce7f4c1b215b9df553c61c8e4c300af51f3d9 /merge-ort.c | |
| parent | 85e4f762c224c52708919a10c9fa5b79e7949564 (diff) | |
| download | git-5633aa3af1282cad5161174f17867399e58b2a54.tar.gz | |
treewide: replace assert() with ASSERT() in special cases
When the compiler/linker cannot verify that an assert() invocation is
free of side effects for us (e.g. because the assertion includes some
kind of function call), replace the use of assert() with ASSERT().
Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-ort.c')
| -rw-r--r-- | merge-ort.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/merge-ort.c b/merge-ort.c index 46e78c3ffa..d484f16cf2 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -791,7 +791,7 @@ static void path_msg(struct merge_options *opt, struct strbuf tmp = STRBUF_INIT; /* Sanity checks */ - assert(omittable_hint == + ASSERT(omittable_hint == (!starts_with(type_short_descriptions[type], "CONFLICT") && !starts_with(type_short_descriptions[type], "ERROR")) || type == CONFLICT_DIR_RENAME_SUGGESTED); @@ -1642,7 +1642,7 @@ static int handle_deferred_entries(struct merge_options *opt, ci = strmap_get(&opt->priv->paths, path); VERIFY_CI(ci); - assert(renames->deferred[side].trivial_merges_okay && + ASSERT(renames->deferred[side].trivial_merges_okay && !strset_contains(&renames->deferred[side].target_dirs, path)); resolve_trivial_directory_merge(ci, side); |
