git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [EXTERNAL] Re: BUG: git clean -d cannot remove files from read-only directories

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 21, 2020, 01:48 UTC
Message-ID
<xmqq36b490cn.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CABPp-BFwNMTRUUonbt3Di8yWDjyF7n2cNQVoLDfHEsk3RVEchQ@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
> should be and what it should do.  Your "put the repository back to a
> pristine state" isn't enough to really go on from an implementation.

Yeah, where does this "pristine state" come from? Do we need to fix the "git clean" documentation to reduce such a confusion (I didn't check to see if the current text is prone to be misunderstood as such yet). "git clean" is to remove crufts, isn't it? The definition of "cruft" being untracked junk that are marked expendable (aka "ignored")? And it is not "remove crurfts no matter what".

Show 5 quoted lines
> angle from my previous response in what you've addressed here.  Let's
> say we did implement a new flag that said we should override standard
> permissions.  In such a case, shouldn't ACLs also be overridden?  ...
> what point do we give up?  What's the clear line...and why does that
> line not just get drawn at not changing permissions at all?

Yup. Elsewhere in the thread you gave "rm -fr" not removing an unwritable subdirectory, and that shows where others before us drew the line that has been accepted by the end users.

Show 7 quoted lines
> I'm sympathetic to "golang does a dumb thing I don't like" (the exact
> situation you hilight has bothered me before too), but it's not clear
> at all to me where or how git might help you cope with that.  To me,
> golang did a dumb and you have to manually undo the dumb.  If you want
> something smarter on the git side instead of the golang side, all the
> stuff I mentioned above are things that would need to be addressed in
> any possible solution that I'm just not seeing.
Amen.
Previous: Elijah Newren
Message 8 of 8 in “Re: BUG: git clean -d cannot remove files from read-only directories”
  1. Adam MilazzoFeb 20, 2020
  2. Elijah NewrenFeb 20, 2020
  3. Adam MilazzoFeb 20, 2020
  4. Junio C HamanoFeb 20, 2020
  5. Adam MilazzoFeb 20, 2020
  6. Elijah NewrenFeb 21, 2020
  7. Elijah NewrenFeb 20, 2020
  8. Junio C HamanoFeb 21, 2020

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.