On Thu, Jan 20, 2022 at 10:08:43AM -0800, Jonathan Tan wrote: > I think the main issue is the first confounding factor you listed above: > even if we didn't have the other confounding factor, that issue alone is > enough to motivate the entire patch set. Likewise, as Junio said [1], I > don't think we need to switch to rename() if we make the checksum > different, so the fix is one-fold, not two-fold. For what it's worth, I > switched back to finalize_object_file() and ran the tests, and they all > pass. Yeah, I agree with both of you and would rather use finalize_object_file() here and be consistent with other callers that modify $GIT_DIR/objects. It is safe to do, since the .rev file's name will necessarily be different if the MIDX's object order changes. > [1] https://lore.kernel.org/git/xmqqtue54iop.fsf@gitster.g/ Thanks, Taylor