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

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

From
YYuri <yuri@rawbw.com>
Date
Jun 10, 2024, 18:36 UTC
Message-ID
<ae862adb-1475-48e9-bd50-0c07dc42a520@rawbw.com>

NFS sometimes leaves files like .nfsXXXXXXXXXXX which usually means that some process that has this file open is alive.

"git clean -df ." was supposed to remove the folder where such file is located, but it encountered the failure, and silently ignored it and succeeded.

Desired behavior: "git clean -df ." should notify the user with warnings or errors for each such file that it failed to remove.

When "git clean -df ." succeeded I ran the next command and it failed because of the still-present folder with the .nfsXXXXXXXXX file in it.

I believe that this is a bug in git.
git-2.38.1
Thanks,
Yuri
Next: Junio C Hamano
Message 1 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.