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