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

Re: [PATCH 2/2] Don't clean any untracked submodule's .git dir by default in git-clean

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 1, 2009, 02:13 UTC
Message-ID
<7vskhhxi9p.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4A4ABF61.7040009@gmail.com>
Jason Holden <jason.k.holden@gmail.com> writes:
> If this becomes the final fix, don't forget to update
> Documentation/git-clean.txt
That's a note to yourself and other people who are intereseted ;-).

My patch was, as with many other patches I send to this list, no more than "if you wanted to do that, you would do it like this.". It definitely wasn't meant to be the final shape of the resolution of this issue.

This is not my itch with a particularly high priority, and I do not have infinite amount of time right now to scratch it.

There shouldn't be any output from dir.[ch] recursive removal function (unless it is reporting an error). Instead, the caller should say "removed" only after it actually removed it, and it needs some reorganizing of the call sequence.

I think the loop in builtin_clean.c should first be refactored into smaller helper functions before any of these changes happen. It has got unmanageably large and ugly over time (or perhaps it was large and ugly from the beginning. I do not even remember who did it initially).

Anyway, enjoy your vacation.
Previous: Jason HoldenNext: Johannes Sixt
Message 9 of 10 in “Don't delete untracked submodule's .git dirs by default”
  1. 0/2 Don't delete untracked submodule's .git dirs by defaultJason Holden, Jun 30, 2009
  2. 1/2 Add option to not delete a .git directory in remove_dir_recursively()Jason Holden, Jun 30, 2009
  3. 2/2 Don't clean any untracked submodule's .git dir by default in git-cleanJason Holden, Jun 30, 2009
  4. Paolo BonziniJun 30, 2009
  5. Johannes SixtJun 30, 2009
  6. Junio C HamanoJun 30, 2009
  7. Junio C HamanoJun 30, 2009
  8. Jason HoldenJul 1, 2009
  9. Junio C HamanoJul 1, 2009
  10. Johannes SixtJun 30, 2009

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.