Skip to content
Snippets Groups Projects
Commit 333a0536 authored by Shawn Pearce's avatar Shawn Pearce Committed by Code Review
Browse files

Merge "Speed up check for modifications of tracked resources"

parents f60df9db b919a943
No related branches found
No related tags found
No related merge requests found
......@@ -567,7 +567,12 @@ public boolean isModified(File wd, boolean forceContentCheck) {
return true;
File file = getFile(wd);
if (!file.exists())
long length = file.length();
if (length == 0) {
if (!file.exists())
return true;
}
if (length != size)
return true;
// JDK1.6 has file.canExecute
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment