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
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 5, 2007, 09:49 UTC
Message-ID
<Pine.LNX.4.64.0712050947370.27959@racer.site>
In-Reply-To
<7veje1zibm.fsf@gitster.siamese.dyndns.org>
Hi,
On Tue, 4 Dec 2007, Junio C Hamano wrote:
Show 11 quoted lines
> @@ -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)?

Ciao, Dscho

Previous: Junio C HamanoNext: Junio C Hamano
Message 3 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.