提交 56906143 编写于 作者: L Linus Torvalds 提交者: Junio C Hamano

[PATCH] Fix silly pathspec bug in git-ls-files

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: NLinus Torvalds <torvalds@osdl.org>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 ab22707f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册