Patch Set 1: I would prefer that you didn't submit this

(3 inline comments)

Have you tried to strace the JVM and see if your change actually reduced the number of stat calls?

On Win32 this should be giving us a nice improvement, but on Linux the VFS is so blazingly fast that we probably can't measure the difference for a local POSIX filesystem like ext2/3/4, XFS, JFS.  Over NFS however this may be a huge difference.

I agree with the logic, and what you are trying to do here.  I'm somewhat surprised this isn't a measurable improvement.  But if the before and after straces show a reduced number of stat(2) syscalls, we should make the change anyway.  Reducing syscalls even if we aren't getting an improvement for the Linux kernel will still help with the really sick cases of 100k+ files in a repository's working directory.