stgit/git.py: Handle a reset that changes files to directories

If reset() takes us from a tree where some path is a file to one
where it is a directory, then checkout() will replace the file
with the directory, and we don't want to try to os.remove() the
path (which would throw an exception because we're trying to
remove a directory.) This fixes bug https://gna.org/bugs/?15682.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
1 file changed