Procházet zdrojové kódy

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
tags/v2.3.0.201302130906
Robin Rosenberg před 11 roky
rodič
revize
b7d11eace6

+ 4
- 1
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java Zobrazit soubor

@@ -759,7 +759,10 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator {
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())

Načítá se…
Zrušit
Uložit