Junio C Hamano <gitster@xxxxxxxxx> writes: >> As pointed out e.g. by t2016.3(git checkout -p), if the patch is to be >> applied in reverse (`git apply -R`), then the `old_mode` is actually 0, >> and we must use `new_mode` instead. > > Good finding. Hmph, this is puzzling and I spoke way before I understand why/how the fixup patch works X-<. The caller of check_preimage(), check_patch(), should happen only after reverse_patches() swapped old and new names and modes in apply_patch(), so at this point, we should be able to consistently use old_mode for checking, shouldn't we, even with "-R"?