提交 12ba7eaf 编写于 作者: L Linus Torvalds

Remove unnecessary usage of strncmp() in git-rev-list arg parsing.

Not only is it unnecessary, it incorrectly allows extraneous characters
at the end of the argument.

Junio noticed the --merge-order thing, and Jon points out that if we fix
that one, we should fix --show-breaks too.
上级 bbca20ac
......@@ -462,11 +462,11 @@ int main(int argc, char **argv)
limited = 1;
continue;
}
if (!strncmp(arg, "--merge-order", 13)) {
if (!strcmp(arg, "--merge-order")) {
merge_order = 1;
continue;
}
if (!strncmp(arg, "--show-breaks", 13)) {
if (!strcmp(arg, "--show-breaks")) {
show_breaks = 1;
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册