提交 2c40f984 编写于 作者: J Junio C Hamano

git-pickaxe: allow -Ln,m as well as -L n,m

The command rejects -L1,10 as an invalid line range specifier
and I got frustrated enough by it, so this makes it allow both
forms of input.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 54a4c617
......@@ -1429,9 +1429,15 @@ int cmd_pickaxe(int argc, const char **argv, const char *prefix)
opt |= PICKAXE_BLAME_COPY | PICKAXE_BLAME_MOVE;
blame_copy_score = parse_score(arg+2);
}
else if (!strcmp("-L", arg) && ++i < argc) {
else if (!strncmp("-L", arg, 2)) {
char *term;
if (!arg[2]) {
if (++i >= argc)
usage(pickaxe_usage);
arg = argv[i];
}
else
arg += 2;
if (bottom || top)
die("More than one '-L n,m' option given");
bottom = strtol(arg, &term, 10);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册