소스 검색

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 11 년 전
부모
커밋
b7d11eace6
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4
    1
      org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java

+ 4
- 1
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())

Loading…
취소
저장