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

Re: * [BUG] "git clean" does not pay attention to its parameters

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 5, 2007, 10:11 UTC
Message-ID
<7vve7dwix3.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<Pine.LNX.4.64.0712050947370.27959@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 17 quoted lines
> Hi,
>
> On Tue, 4 Dec 2007, Junio C Hamano wrote:
>
>> @@ -85,12 +86,17 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
>>  	read_directory(&dir, path, base, baselen, pathspec);
>>  	strbuf_init(&directory, 0);
>>  
>> -	for (j = 0; j < dir.nr; ++j) {
>> -		struct dir_entry *ent = dir.entries[j];
>> -		int len, pos, specs;
>> +	if (pathspec) {
>> +		for (i = 0; pathspec[i]; i++)
>> +			; /* nothing */
>> +		seen = xmalloc();
>
> Did you mean xmalloc(i)?
Yes.
Previous: Johannes SchindelinNext: Sam Ravnborg
Message 4 of 9 in “[BUG] "git clean" does not pay attention to its parameters”
  1. Nanako ShiraishiDec 5, 2007
  2. Junio C HamanoDec 5, 2007
  3. Johannes SchindelinDec 5, 2007
  4. Junio C HamanoDec 5, 2007
  5. Sam RavnborgDec 5, 2007
  6. Shawn BohrerDec 5, 2007
  7. Junio C HamanoDec 6, 2007
  8. Jeff KingDec 5, 2007
  9. Jeff KingDec 6, 2007

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.