On 3/29/2022 12:44 PM, Junio C Hamano wrote: > Derrick Stolee <derrickstolee@xxxxxxxxxx> writes: > >>> Note that the test added in 't7001-mv.sh' requires a "sleep 1" to ensure the >>> 'ctime' of the file creation will be definitively older than the 'ctime' of >>> the renamed file in 'git mv'. >> >> Unfortunate that this is necessary, but it seems to be the only way >> to handle this because of the interaction with the system clock and >> the filesystem. There are several sleeps like this in >> t1701-racy-split-index.sh, for example. > > Does "test-tool chmtime" to tweak the filesystem timestamp help? I > didn't look at the specific step that uses sleep to work around. The issue here is related to ctime, which is not modified by that helper. It also uses utime() which does not seem to have a way to modify ctime (which makes sense). Thanks, -Stolee