Consider that some Java version on Linux only return integral timestamps
This logic is similar to what we do on Windows, but in this case it's Java that truncates the timestamps, not Git. Bug: 395410 Change-Id: Ie55dcb9fa583f5c3dd10d7a1b582e5b04b45858d
This commit is contained in:
parent
5c49b93191
commit
b7d11eace6
|
@ -759,7 +759,10 @@ public MetadataDiff compareMetadata(DirCacheEntry entry) {
|
|||
long fileLastModified = getEntryLastModified();
|
||||
if (cacheLastModified % 1000 == 0)
|
||||
fileLastModified = fileLastModified - fileLastModified % 1000;
|
||||
|
||||
// Some Java version on Linux return whole seconds only even when
|
||||
// the file systems supports more precision.
|
||||
else if (fileLastModified % 1000 == 0)
|
||||
cacheLastModified = cacheLastModified - cacheLastModified % 1000;
|
||||
if (fileLastModified != cacheLastModified)
|
||||
return MetadataDiff.DIFFER_BY_TIMESTAMP;
|
||||
else if (!entry.isSmudged())
|
||||
|
|
Loading…
Reference in New Issue