The "verify_pathspec()" function doesn't test for ending NUL character in the pathspec, causing some really funky and unexpected behaviour. It just happened to work in the cases I had tested.
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- diff --git a/ls-files.c b/ls-files.c --- a/ls-files.c +++ b/ls-files.c @@ -496,7 +496,7 @@ static void verify_pathspec(void) char c = n[i]; if (prev && prev[i] != c) break; - if (c == '*' || c == '?') + if (!c || c == '*' || c == '?') break; if (c == '/') len = i+1; - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html