Merge "Speed up check for modifications of tracked resources"
This commit is contained in:
commit
333a0536a7
|
@ -567,8 +567,13 @@ public boolean isModified(File wd, boolean forceContentCheck) {
|
|||
return true;
|
||||
|
||||
File file = getFile(wd);
|
||||
long length = file.length();
|
||||
if (length == 0) {
|
||||
if (!file.exists())
|
||||
return true;
|
||||
}
|
||||
if (length != size)
|
||||
return true;
|
||||
|
||||
// JDK1.6 has file.canExecute
|
||||
// if (file.canExecute() != FileMode.EXECUTABLE_FILE.equals(mode))
|
||||
|
@ -600,9 +605,6 @@ public boolean isModified(File wd, boolean forceContentCheck) {
|
|||
}
|
||||
}
|
||||
|
||||
if (file.length() != size)
|
||||
return true;
|
||||
|
||||
// Git under windows only stores seconds so we round the timestamp
|
||||
// Java gives us if it looks like the timestamp in index is seconds
|
||||
// only. Otherwise we compare the timestamp at millisecond prevision.
|
||||
|
|
Loading…
Reference in New Issue