Re: [BUG] "git clean -df ." silently doesn't delete folders with stale .nfs* files
- From
- 'Yuri' <yuri@rawbw.com>
- Date
- Jun 11, 2024, 01:09 UTC
- Message-ID
- <8fdc76e2-3de2-4312-956c-2662336fa54d@rawbw.com>
- In-Reply-To
- <0ee501dabb91$aa2340a0$fe69c1e0$@nexbridge.com>
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.
Thanks, Yuri