Make index preloading check the whole path to the file
commitf62ce3de9dd4803f50f65e17f5fc03c7bdb49c40
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 9 Jul 2009 20:37:02 +0000 (9 13:37 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Jul 2009 05:38:34 +0000 (9 22:38 -0700)
tree71829426877be588574a67a084c1649c39eef5c7
parentb9fd284657de3ec30922fb17c0baf243ae947fdd
Make index preloading check the whole path to the file

This uses the new thread-safe 'threaded_has_symlink_leading_path()'
function to efficiently verify that the whole path leading up to the
filename is a proper path, and does not contain symlinks.

This makes 'ce_uptodate()' a much stronger guarantee: it no longer just
guarantees that the 'lstat()' of the path would match, it also means
that we know that people haven't played games with moving directories
around and covered it up with symlinks.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
preload-index.c