Toby Cubitt wrote:
> Eric M. Ludlam wrote:
> > The cache loading system attempts to validate tags based on file
> > size, but if you just move stuff around, and don't change the number
> > of characters in the file, you could trick it.
> Quick question: why not use a hash value instead of file size? I =
> the `md5' function is part of standard Emacs, and since it's a =
> function, it's pretty efficient too.
A hash value entails opening and reading every byte in a file. The
accumulated experience over MANY version control systems has shown
file size plus time last modified to be very good at detecting file
modification. This pair of values has the virtue that it is available
from an inode without accessing any bytes of the subject file.