author | Linus Torvalds <torvalds@linux-foundation.org> | |
Fri, 20 Apr 2007 05:48:21 +0000 (22:48 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 20 Apr 2007 05:48:21 +0000 (22:48 -0700) | ||
commit | 851c603e9ca9d0954d89be1532d924a28ccb79fa | |
tree | d038d97634b0705a1836095c0a53eb926a2f77ae | tree | snapshot |
parent | 2de00bf9e8815970c61cefaef35efeacd8a7d6de | commit | diff |
Fix working directory errno handling when unlinking a directory
Alex Riesen noticed that the case where a file replaced a directory entry
in the working tree was broken on cygwin. It turns out that the code made
some Linux-specific assumptions, and also ignored errors entirely for the
case where the entry was a symlink rather than a file.
This cleans it up by separating out the common case into a function of its
own, so that both regular files and symlinks can share it, and by making
the error handling more obvious (and not depend on any Linux-specific
behaviour).
Acked-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Alex Riesen noticed that the case where a file replaced a directory entry
in the working tree was broken on cygwin. It turns out that the code made
some Linux-specific assumptions, and also ignored errors entirely for the
case where the entry was a symlink rather than a file.
This cleans it up by separating out the common case into a function of its
own, so that both regular files and symlinks can share it, and by making
the error handling more obvious (and not depend on any Linux-specific
behaviour).
Acked-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
merge-recursive.c | diff | blob | history |