// wait to ensure that file-modTimes and therefore index entry modTime
// doesn't match the modtime of index-file after next persistance
modTimes.add(valueOf(fsTick(lastFile)));
// now add both files to the index. No racy git expected
resetIndex(new FileTreeIteratorWithTimeControl(db, modTimes));
assertEquals(
"[a, mode:100644, time:t0, length:1, content:a]" +
"[b, mode:100644, time:t0, length:1, content:b]",
indexState(SMUDGE | MOD_TIME | LENGTH | CONTENT));
// Remember the last modTime of index file. All modifications times of
// further modification are translated to this value so it looks that
// files have been modified in the same time slot as the index file
modTimes.add(Long.valueOf(db.getIndexFile().lastModified()));
// modify one file
addToWorkDir("a", "a2");
// now update the index the index. 'a' has to be racily clean -- because
// it's modification time is exactly the same as the previous index file
// mod time.
resetIndex(new FileTreeIteratorWithTimeControl(db, modTimes));
db.readDirCache();
// although racily clean a should not be reported as being dirty
assertEquals(
"[a, mode:100644, time:t1, smudged, length:0, content:a2]" +