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
Junio C Hamano <gitster@pobox.com>
Date
Jun 11, 2024, 00:29 UTC
Message-ID
<xmqqmsnsxqwy.fsf@gitster.g>
In-Reply-To
<0ee501dabb91$aa2340a0$fe69c1e0$@nexbridge.com>
<rsbecker@nexbridge.com> writes:
Show 7 quoted lines
> 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

I suspec that this is different from a real NFSv3 client in that removal of such "removed while still open" files would result in another one automatically resurrected by the filesystem.

In any case, if we cannot remove a file (due to filesystem limitation), we should report the fact, just like in a case where we cannot remove a regular file, e.g.

    $ cd git.git/
    $ mkdir -p junk/ttt
    $ >junk/ttt/sss
    $ chmod a-w junk/ttt
    $ cd junk
    $ git clean -f -d -x ttt; echo $?
    warning: failed to remove ttt/sss: Permission denied
    1

Figuring out why it is not happening is left as an exercise to readers ;-), as I no longer have an NFSv3 environment handy.

Thanks.
Previous: rsbecker@nexbridge.comNext: 'Yuri'
Message 7 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.