diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-04-08 11:43:12 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-08 11:43:12 -0700 |
| commit | b97b360c514acd0f5a148524a85bcdb583dbe914 (patch) | |
| tree | dc16900efcc7576ec5211f9c340e18bd01dd9020 /diffcore-rename.c | |
| parent | The third batch (diff) | |
| parent | treewide: replace assert() with ASSERT() in special cases (diff) | |
| download | git-b97b360c514acd0f5a148524a85bcdb583dbe914.tar.gz git-b97b360c514acd0f5a148524a85bcdb583dbe914.zip | |
Merge branch 'en/assert-wo-side-effects'
Ensure what we write in assert() does not have side effects,
and introduce ASSERT() macro to mark those that cannot be
mechanically checked for lack of side effects.
* en/assert-wo-side-effects:
treewide: replace assert() with ASSERT() in special cases
ci: add build checking for side-effects in assert() calls
git-compat-util: introduce ASSERT() macro
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 5002e896aa..8077283fc7 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"); |
