diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java
index 688957b95bdbc5daca9a90454d55849baa51f5eb..4ae24f5e2e47a25d860367ee362878e297f1eb80 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitIndex.java
@@ -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.