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 /diffcore-rename.c | |
| parent | ci: add build checking for side-effects in assert() calls (diff) | |
| download | git-5633aa3af1282cad5161174f17867399e58b2a54.tar.gz git-5633aa3af1282cad5161174f17867399e58b2a54.zip | |
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 'diffcore-rename.c')
| -rw-r--r-- | diffcore-rename.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c index 91b77993c7..624304f041 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -1406,7 +1406,7 @@ void diffcore_rename_extended(struct diff_options *options, trace2_region_enter("diff", "setup", options->repo); info.setup = 0; - assert(!dir_rename_count || strmap_empty(dir_rename_count)); + ASSERT(!dir_rename_count || strmap_empty(dir_rename_count)); want_copies = (detect_rename == DIFF_DETECT_COPY); if (dirs_removed && (break_idx || want_copies)) BUG("dirs_removed incompatible with break/copy detection"); |
