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

Re: BUG - git clean

From
Di Xu <xudifsd@gmail.com>
Date
Oct 12, 2013, 10:36 UTC
Message-ID
<loom.20131012T122854-19@post.gmane.org>
In-Reply-To
<52584914.6030103@gmail.com>
Show 13 quoted lines
> mkdir test
> cd test
> git init .
> mkdir ba
> mkdir ba/ca
> 
> # So far so good.
> # Should clean directory "ba/ca"
> git clean -dn -- ba/ca
> 
> # Should clean "ba/ca" and ignore non-existent "j"
> # Instead, it wants to delete "ba" totally.
> git clean -dn -- ba/ca j

actually, my git will also do it wrong when 'j' exist, do these after your script:

$ git clean -dn ba/ca j Would remove ba/ $ mkdir j $ git clean -dn ba/ca j Would remove ba/ #here missing 'ca' Would remove j/

I think it's the problem of directory path manipulation.
Previous: jones.noamle
Message 2 of 2 in “BUG - git clean”
  1. jones.noamleOct 11, 2013
  2. Di XuOct 12, 2013

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.