Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:56

Johannes Schindelin [off-list ref] writes:
Hi,

On Tue, 4 Dec 2007, Junio C Hamano wrote:
quoted
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help