git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix 'git clean' failure on NFS.

From
Török Edwin <edwintorok@gmail.com>
Date
Jun 18, 2010, 13:50 UTC
Message-ID
<4C1B798D.5020305@gmail.com>
In-Reply-To
<AANLkTinEGpB567-v8TXFv5ghXfjY9ZtkOMYcGOhzePj3@mail.gmail.com>
On 2010-06-18 16:26, Erik Faye-Lund wrote:
Show 26 quoted lines
> 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.
Show 7 quoted lines
> 
>> 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

Previous: Erik Faye-Lund
Message 10 of 10 in “[BUG] git clean not working on FreeBSD/NFS”
  1. Török EdwinJun 17, 2010
  2. Henrik GrubbströmJun 17, 2010
  3. Török EdwinJun 18, 2010
  4. Fix 'git clean' failure on NFS.Török Edwin, Jun 18, 2010
  5. Johannes SixtJun 18, 2010
  6. Török EdwinJun 18, 2010
  7. Erik Faye-LundJun 18, 2010
  8. Török EdwinJun 18, 2010
  9. Erik Faye-LundJun 18, 2010
  10. Török EdwinJun 18, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.