diff options
author | Junio C Hamano <junkio@cox.net> | 2006-10-29 23:50:38 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-10-29 23:50:55 -0800 |
commit | 2c40f98439e07b8579d0549109a4feed54da9e40 (patch) | |
tree | f07eb5d5200e4368f1fac4634b4d90275a1e41c0 | |
parent | 54a4c6173e30774125016f7ff4976eb4a7485d0c (diff) | |
download | git-2c40f98439e07b8579d0549109a4feed54da9e40.tar.gz |
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: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | builtin-pickaxe.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/builtin-pickaxe.c b/builtin-pickaxe.c index b53c7b0617..200772c75a 100644 --- a/builtin-pickaxe.c +++ b/builtin-pickaxe.c @@ -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; - arg = argv[i]; + 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); |