diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-07-31 05:56:04 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-07-31 08:52:16 -0700 |
| commit | 341ce9229e9b5619b686ed9d169b54e33b29f594 (patch) | |
| tree | 4891a0f8a0029d43247f1f63e8188eaadec5b6db /t/t4013/diff.format-patch_--inline_--stdout_initial..master | |
| parent | e28c701fe41825013220e1b9fefe8da038070aa2 (diff) | |
read-cache: add remove_file_from_index_with_flags()
add_file_to_index() takes flags such as ADD_CACHE_PRETEND and
ADD_CACHE_VERBOSE and internally handles both reporting (e.g.,
"add 'path'") and suppressing index updates during dry runs.
In contrast, remove_file_from_index() takes only istate and path
without flags. Callers that perform file removals (such as
update_callback() in read-cache.c) are forced to manually inspect
ADD_CACHE_PRETEND and ADD_CACHE_VERBOSE flags for removed
files.
Introduce remove_file_from_index_with_flags() to encapsulate
pretend mode and verbose reporting for index removals. Update
update_callback() to use the new helper.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.format-patch_--inline_--stdout_initial..master')
0 files changed, 0 insertions, 0 deletions
