mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
85e4f762c2
commit
5633aa3af1
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user