summaryrefslogtreecommitdiff
path: root/t/t3030-merge-recursive.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2011-01-13 02:28:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-01-13 19:26:09 (GMT)
commita93e530184b3f7ae9d9bfb0e569734687f8d1c0b (patch)
tree21ebaba78fd780dabd8bcc2357499d40bd11adfb /t/t3030-merge-recursive.sh
parent92fda79ed048d2d37e760e7a1b6055b2fc801ee3 (diff)
downloadgit-a93e530184b3f7ae9d9bfb0e569734687f8d1c0b.zip
git-a93e530184b3f7ae9d9bfb0e569734687f8d1c0b.tar.gz
git-a93e530184b3f7ae9d9bfb0e569734687f8d1c0b.tar.bz2
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 <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3030-merge-recursive.sh')
0 files changed, 0 insertions, 0 deletions