From: <rsbecker@nexbridge.com>
To: "'Yuri'" <yuri@rawbw.com>, "'Junio C Hamano'" <gitster@pobox.com>
Cc: "'Git Mailing List'" <git@vger.kernel.org>
Subject: RE: [BUG] "git clean -df ." silently doesn't delete folders with stale .nfs* files
Date: Mon, 10 Jun 2024 21:19:38 -0400 [thread overview]
Message-ID: <0eef01dabb9d$70c99690$525cc3b0$@nexbridge.com> (raw)
In-Reply-To: <8fdc76e2-3de2-4312-956c-2662336fa54d@rawbw.com>
On Monday, June 10, 2024 9:10 PM, Yuri wrote:
>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?
next prev parent reply other threads:[~2024-06-11 1:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 18:36 [BUG] "git clean -df ." silently doesn't delete folders with stale .nfs* files Yuri
2024-06-10 19:58 ` Junio C Hamano
2024-06-10 20:08 ` Yuri
2024-06-10 21:37 ` Junio C Hamano
2024-06-10 23:27 ` Yuri
2024-06-10 23:55 ` rsbecker
2024-06-11 0:29 ` Junio C Hamano
2024-06-11 1:09 ` 'Yuri'
2024-06-11 1:19 ` rsbecker [this message]
2024-06-11 1:22 ` 'Yuri'
2024-06-11 1:46 ` Chris Torek
2024-06-11 6:48 ` Jeff King
2024-06-11 7:43 ` 'Yuri'
2024-06-13 8:09 ` Gabor Gombas
2024-06-13 9:21 ` 'Yuri'
2024-06-11 13:48 ` rsbecker
2024-06-11 17:46 ` 'Yuri'
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='0eef01dabb9d$70c99690$525cc3b0$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=yuri@rawbw.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox