diff options
author | Tao Klerks <tao@klerks.biz> | 2022-02-27 21:56:59 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-28 10:02:17 -0800 |
commit | a67d178be4e604426152212c1c589b2e7f05e29f (patch) | |
tree | 6f83fbf0e4251f6b67ee9576199e4227b3ebef6a /commit.c | |
parent | dab1b7905d0b295f1acef9785bb2b9cbb0fdec84 (diff) |
t7519: avoid file to index mtime race for untracked cache
In t7519 there is a test that writes files to disk, and immediately
writes the index with the untracked cache. Because of
mtime-comparison logic that uses a 1-second resolution, this means
the cached entries are not trusted/used under some circumstances
(see read-cache.c#is_racy_stat()).
Untracked cache tests in t7063 use a 1-second delay to avoid this
issue, but we don't want to introduce arbitrary slowdowns, so instead
use test-tool chmtime to backdate the files slightly. The t7063
delays are a #leftoverbit, to be worked on in a separate series.
This change doesn't actually affect the outcome of the test, but does
enhance its validity, and becomes relevant after later changes.
Signed-off-by: Tao Klerks <tao@klerks.biz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions