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 7, 2012, 00:15 UTC
Message-ID
<7d290bdc-8654-4526-ba73-89408fa99a16@DB3EHSMHS002.ehs.local>
In-Reply-To
<7v8v9bjd44.fsf@alter.siamese.dyndns.org>
Hi,
On Thu, Dec 06, 2012 at 09:37:31AM -0800, Junio C Hamano wrote:
Show 27 quoted lines
> Zoltan Klinger <zoltan.klinger@gmail.com> writes:
> 
> > Only print out the names of the files and directories that got actually
> > deleted.
> >
> > Consider the following repo layout:
> >   |-- test.git/
> >         |-- foo/
> >              |-- bar/
> >                   |-- bar.txt
> >              |-- frotz.git/
> >                   |-- frotz.txt
> >         |-- tracked_file1
> >         |-- untracked_file1
> > ...
> > Consider the output of the improved version:
> >
> >   $ git clean -fd
> >   Removed foo/bar/bar.txt
> >   Removed foo/bar
> >   Removed untracked_file1
> 
> Hrm, following your discussion (ellided above), I would have
> expected that you would show
> 
>     Removing directory foo/bar
>     Removing untracked_file1

Also it would be nice to have warnings about undeleted directories since this git clean behavior (or the work around to pass -f twice) is not documented. Without a warning you would probably miss that something was _not_ deleted.

So something like:
	Removing foo
	Removing bar
	...
	Warning: Not all untracked objects have been deleted:
	<list objects here> (optional)
	Use git clean --force --force to delete all objects.
But clearly going into a good direction. Thanks.
	Soren
Previous: Junio C HamanoNext: Zoltan Klinger
Message 3 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.