path: root/t/t4013
diff options
authorJonathan Nieder <>2011-01-13 02:28:09 (GMT)
committerJunio C Hamano <>2011-01-13 19:26:09 (GMT)
commita93e530184b3f7ae9d9bfb0e569734687f8d1c0b (patch)
tree21ebaba78fd780dabd8bcc2357499d40bd11adfb /t/t4013
parent92fda79ed048d2d37e760e7a1b6055b2fc801ee3 (diff)
unpack-trees: handle lstat failure for existing file
When check_leading_path notices a file in the way of a new entry to be checked out, verify_absent uses (1) the mode to determine whether it is a directory (2) the rest of the stat information to check if this is actually an old entry, disguised by a change in filename (e.g., README -> Readme) that is significant to git but insignificant to the underlying filesystem. If lstat fails, these checks are performed with an uninitialied stat structure, producing essentially random results. Better to just error out when lstat fails. The easiest way to reproduce this is to remove a file after the check_leading_path call and before the lstat in verify_absent. An lstat failure other than ENOENT in check_leading_path would also trigger the same code path. Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/t4013')
0 files changed, 0 insertions, 0 deletions