diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2013-01-08 17:50:01 -0500 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2013-01-08 17:50:01 -0500 |
commit | 04214819784b722b7ab24bb82150b393a085b6b8 (patch) | |
tree | 19e1229889c1b0c025c2389aae05f779c11cc461 /org.eclipse.jgit | |
parent | c5c683e7e998ce521b5d5d99c88eef363a14a6b7 (diff) | |
parent | b7d11eace6d7f0c846dfe818f9ba4cf36a8779f1 (diff) | |
download | jgit-04214819784b722b7ab24bb82150b393a085b6b8.tar.gz jgit-04214819784b722b7ab24bb82150b393a085b6b8.zip |
Merge "Consider that some Java version on Linux only return integral timestamps"
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java index e16bf7ffa9..1858626cdf 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java @@ -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()) |