[BUG] "git clean -df ." silently doesn't delete folders with stale .nfs* files
- From
- Yuri <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