public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Yuri <yuri@rawbw.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 14:37:31 -0700	[thread overview]
Message-ID: <xmqqikygzdgk.fsf@gitster.g> (raw)
In-Reply-To: <4ed426e4-beb6-45ed-b493-1e19c7c0511b@rawbw.com> (yuri@rawbw.com's message of "Mon, 10 Jun 2024 13:08:38 -0700")

Yuri <yuri@rawbw.com> writes:

> On 6/10/24 12:58, Junio C Hamano wrote:
>> So "was supposed to remove" above is not quite correct. Where did
>> such a piece of misinformation come from?
>
>
> "git clean -df ." removes all files that
>
> (1) aren't added to the repo
>
> (2) aren't added as exceptions
>
> (3) aren't repo files themselves.

But .nfs* files are not something you as an application are not
supposed to touch, so a directory that still contains one cannot be
removed, either.

It's a limitation (I wouldn't call it a "bug") of NFS.  You can kill
the process (or wait until they exit) holding the file open and then
run "clean -df" again, perhaps.

A few Google searches tell us more, e.g.

 - https://nfs.sourceforge.net/#faq_d2
 - https://kb.netapp.com/on-prem/ontap/da/NAS/NAS-KBs/What_are_nfsXXXX_files_and_how_do_I_delete_them

They tell us what these files, which are the result of "silly
rename", are, why they exist, and that they will appear again even
if we remove them.  So we don't remove them, which means the
directory that contains them will not become empty, which in turn
means we do not remove them.


  reply	other threads:[~2024-06-10 21:37 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 [this message]
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
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=xmqqikygzdgk.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --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