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

Re: [PATCH] git-clean: Display more accurate delete messages

From
SBSoren Brinkmann <soren.brinkmann@xilinx.com>
Date
Dec 10, 2012, 17:33 UTC
Message-ID
<5b69a9f1-0860-41da-914c-d55a17e54092@TX2EHSMHS026.ehs.local>
In-Reply-To
<7v38zecrqc.fsf@alter.siamese.dyndns.org>
Hi, 
On Sun, Dec 09, 2012 at 11:04:59PM -0800, Junio C Hamano wrote:
Show 49 quoted lines
> Zoltan Klinger <zoltan.klinger@gmail.com> writes:
> 
> > Would like to get some more feedback on the proposed output in case of
> >  (1) an untracked subdirectory with multiple files where at least one of them
> >      cannot be removed.
> >  (2) reporting ignored untracked git subdirectories
> >
> > Suppose we have a repo like the one below:
> >   test.git/
> >     |-- tracked_file
> >     |-- untracked_file
> >     |-- untracked_foo/
> >     |     |-- bar/
> >     |     |     |-- bar.txt
> >     |     |-- emptydir/
> >     |     |-- frotz.git/
> >     |     |     |-- frotx.txt
> >     |     |-- quux/
> >     |           |-- failedquux.txt
> >     |           |-- quux.txt
> >     |-- untracked_unreadable_dir/
> >     |     |-- afile
> >     |-- untracked_some.git/
> >           |-- some.txt
> >
> > $ git clean -fd
> > Removing untracked_file
> > Removing untracked_foo/bar
> > Removing untracked_foo/emptydir
> > Removing untracked_foo/quux/quux.txt
> > warning: failed to remove untracked_foo/quux/failedquux.txt
> > warning: failed to remove remove untracked_unreadable_dir/
> 
> "remove remove" is a typo, I presume.
> 
> > warning: ignoring untracked git repository untracked_foo/frotz.git/
> > warning: ignoring untracked git repository untracked_some.git/
> 
> If you mean "we report the topmost directory and nothing about
> (recursive) contents in it if everything is removed successfully"
> (in other words, if we had subdirectories and files inside
> untracked_foo/bar/ and we successfully removed all of them, the
> above output does not change), it seems quite reasonable.
> 
> > Use git clean --force --force to delete all untracked git repositories
> 
> But I am not sure if this is ever sane.  Especially the one that
> removes an embedded repository is suspicious.  "git clean" should
> not ever touch it with or without --superforce or any other command.

As I mentioned in my email where I reported this incorrect git clean output, I have a use case where I want git clean to remove embedded repositories. Whether it is a sane one is probably a different discussion.

	Soren
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 11 in “git-clean: Display more accurate delete messages”
  1. git-clean: Display more accurate delete messagesZoltan Klinger, Dec 6, 2012
  2. Junio C HamanoDec 6, 2012
  3. Soren BrinkmannDec 7, 2012
  4. Zoltan KlingerDec 9, 2012
  5. Junio C HamanoDec 10, 2012
  6. Soren BrinkmannDec 10, 2012
  7. Junio C HamanoDec 10, 2012
  8. Soren BrinkmannDec 10, 2012
  9. Junio C HamanoDec 10, 2012
  10. Zoltan KlingerDec 11, 2012
  11. Soren BrinkmannDec 10, 2012

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.