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

Re: git clean --exclude broken?

From
Todd Rinaldo <toddr@cpanel.net>
Date
Aug 24, 2011, 23:08 UTC
Message-ID
<F6809F96-2D71-482C-934F-2CF4EA74FEA1@cpanel.net>
In-Reply-To
<7vliuio65w.fsf@alter.siamese.dyndns.org>
On Aug 24, 2011, at 4:23 PM, Junio C Hamano wrote:
Show 7 quoted lines
> Todd Rinaldo <toddr@cpanel.net> writes:
> 
>> I think I have found a new bug in 1.7.5:
> 
> My quick check indicates 1.7.3 behaves the same way, and 1.7.2.5 didn't
> have --exclude option, so this does not seem to be anything particularly
> new in the 1.7.5 release.
No. I was just clarifying what my binary was for research purposes.
Show 8 quoted lines
> 
>> # The problem (Why is foo/ removed?)
>> $>git clean -dXf --exclude=/foo
>> Removing bar/
>> Removing foo/
> 
> Why is this command line giving -X that tells us not to use the ignore
> rules, and --exclude option at the same time?
My more complicated use of the command wanted to use the .gitignore rules to cleanup ignored files with the exception of 1 directory. I believe -dxf --exclude is also broken in the same way.
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 11 in “git clean --exclude broken?”
  1. Todd RinaldoAug 24, 2011
  2. Junio C HamanoAug 24, 2011
  3. Todd RinaldoAug 24, 2011
  4. Junio C HamanoAug 25, 2011
  5. Re* git clean --exclude broken?Junio C Hamano, Aug 25, 2011
  6. Michael SchubertAug 25, 2011
  7. Junio C HamanoAug 25, 2011
  8. Thomas RastAug 26, 2011
  9. Pete WyckoffAug 27, 2011
  10. Junio C HamanoAug 28, 2011
  11. Pete WyckoffAug 28, 2011

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.