On Thu, 14 Jul 2005, Linus Torvalds wrote:
>
> I'll strace the dang thing.
It's the "Adding" case in git-merge-one-file-script, which does
git-checkout-cache -u -f -- "$4"
and it's because of this:
lstat64("DF", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
unlink("DF") = -1 EISDIR (Is a directory)
.. unpack the object ..
open("DF", O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0666) = -1 EEXIST (File
exists)
ie the problem is that we actually _have_ a test for this, but it's:
if (errno == EISDIR && force) {
but if the directory already exists, we do that wrong.
Btw, this also shows a different problem: the symlink handling doesn't do
any of this, so you cannot even force a directory to become a symlink.
I think both problems can be fixed by just moving the (EISDIR && force)
test down to the "unlink()".
Will try.
Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html