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

RE: [BUG] "git clean -df ." silently doesn't delete folders with stale .nfs* files

From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
Date
Jun 11, 2024, 01:19 UTC
Message-ID
<0eef01dabb9d$70c99690$525cc3b0$@nexbridge.com>
In-Reply-To
<8fdc76e2-3de2-4312-956c-2662336fa54d@rawbw.com>
On Monday, June 10, 2024 9:10 PM, Yuri wrote:
Show 30 quoted lines
>On 6/10/24 16:55, rsbecker@nexbridge.com wrote:
>> I have tried to reproduce your situation using git 2.43.0 without
>> success. $ mkdir test $ cd test $ touch .nfs12309 $ git clean -df .
>> Removing .nfs12309
>
>
>"touch .nfs12309" isn't enough.
>
>
>Here is a reliable way to reproduce the problem:
>1. Have a git repository on an NFS disk.
>2. mkdir xx
>3. touch xx/x
>4. tail -f xx/x &
>5. rm xx/x
>6. git clean -df .
>
>
>
>
>The last operation reproduces the problem. The xx directory and the .nfsNNNN file
>in it stay without warnings.
>The .nfsNNNN file is created by the NFS client when the xx/x file is removed.
>
>
>Anybody with an NFS disk should be able to reproduce it.
>
>FYI: Git generally warns about files that it can't remove because of permissions and
>special flags reasons.
>But Git doesn't warn users about this situation with an NFS directory lock file.
That is what I suspected. I am suspecting that git does not see the .nfsNNNN file when it is performing the clean. I think NFS creates the file after git does the scan, so as far as git is concerned, there is no .nfsNNNN file until after the operation completes. NFS puts the file there independent of git, so git does not even know about it. Does a second git clean -df . remove the .nfsNNNN file and put a new one, with a different name, in place?
Previous: 'Yuri'Next: 'Yuri'
Message 9 of 17 in “[BUG] "git clean -df ." silently doesn't delete folders with stale .nfs* files”
  1. YuriJun 10, 2024
  2. Junio C HamanoJun 10, 2024
  3. YuriJun 10, 2024
  4. Junio C HamanoJun 10, 2024
  5. YuriJun 10, 2024
  6. rsbecker@nexbridge.comJun 10, 2024
  7. Junio C HamanoJun 11, 2024
  8. 'Yuri'Jun 11, 2024
  9. rsbecker@nexbridge.comJun 11, 2024
  10. 'Yuri'Jun 11, 2024
  11. Chris TorekJun 11, 2024
  12. Jeff KingJun 11, 2024
  13. 'Yuri'Jun 11, 2024
  14. Gabor GombasJun 13, 2024
  15. 'Yuri'Jun 13, 2024
  16. rsbecker@nexbridge.comJun 11, 2024
  17. 'Yuri'Jun 11, 2024

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.