From: "Török Edwin" <edwintorok@gmail.com>
To: kusmabite@gmail.com
Cc: Erik Faye-Lund <kusmabite@googlemail.com>, git <git@vger.kernel.org>
Subject: Re: [PATCH] Fix 'git clean' failure on NFS.
Date: Fri, 18 Jun 2010 16:50:05 +0300 [thread overview]
Message-ID: <4C1B798D.5020305@gmail.com> (raw)
In-Reply-To: <AANLkTinEGpB567-v8TXFv5ghXfjY9ZtkOMYcGOhzePj3@mail.gmail.com>
On 2010-06-18 16:26, Erik Faye-Lund wrote:
> 2010/6/18 Török Edwin <edwintorok@gmail.com>:
>> On 06/18/2010 03:29 PM, Erik Faye-Lund wrote:
>>> 2010/6/18 Török Edwin <edwintorok@gmail.com>:
>>>> readdir() used to do a single pass, which is not always enough.
>>>> If you unlink some files/rmdir some subdirs then there might be some
>>>> files you haven't seen yet *before* the readdir cursor (files get rearranged
>>>> in the directory, etc.).
>>>>
>>>> The fix is to do an additional readdir() pass if we unlinked/rmdired something.
>>>> This is easily accomplished by using rewinddir.
>>>>
>>>
>>> Won't this break on Windows? mingw_readdir() doesn't seem to have a
>>> maching mingw_rewinddir() in compat/mingw.c/h....
>>>
>>
>> rewinddir() is used in ClamAV too, and it builds natively on win32.
>> I think we have some compat function that map rewinddir to the Win32
>> API, somebody will probably have to do that for git too.
>>
>
> There's a rewinddir function in msvcrt.dll. However, we're not using
> msvcrt.dll's opendir() implementation for performance reasons, so this
> patch would require a rewinddir implementation as a preparation path,
> no? If such a patch could be extracted from ClamAV (and ClamAV is
> license compatible with git
ClamAV is GPLv2 only. git is the same AFAICT, so it should be fine.
>), would you mind including such a patch
> for the next round?
Will try to do that later today.
>
>> Another possibility is to do closedir/opendir again on mingw.
>
> Yes. Yet another possibility is to enable the
> NO_MINGW_REPLACE_READDIR-switch, but this has negative performance
> effects...
>
I'd rather not do that.
Best regards,
--Edwin
prev parent reply other threads:[~2010-06-18 13:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 14:26 [BUG] git clean not working on FreeBSD/NFS Török Edwin
2010-06-17 15:18 ` Henrik Grubbström
2010-06-18 11:03 ` Török Edwin
2010-06-18 11:07 ` [PATCH] Fix 'git clean' failure on NFS Török Edwin
2010-06-18 12:17 ` Johannes Sixt
2010-06-18 13:09 ` Török Edwin
2010-06-18 12:29 ` Erik Faye-Lund
2010-06-18 13:01 ` Török Edwin
2010-06-18 13:26 ` Erik Faye-Lund
2010-06-18 13:50 ` Török Edwin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C1B798D.5020305@gmail.com \
--to=edwintorok@gmail.com \
--cc=git@vger.kernel.org \
--cc=kusmabite@gmail.com \
--cc=kusmabite@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).