do not overwrite files in leading path
authorClemens Buchacher <drizzd@aon.at>
Sat, 9 Oct 2010 13:53:00 +0000 (15:53 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Oct 2010 21:34:09 +0000 (14:34 -0700)
If the work tree contains an untracked file x, and
unpack-trees wants to checkout a path x/*, the
file x is removed unconditionally.

Instead, apply the same checks that are normally
used for untracked files, and abort if the file
cannot be removed.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
No differences found