Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-pickaxe: allow -Ln,m as well as -L n,m
author
Junio C Hamano
<junkio@cox.net>
Mon, 30 Oct 2006 07:50:38 +0000
(23:50 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Mon, 30 Oct 2006 07:50:55 +0000
(23:50 -0800)
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>
builtin-pickaxe.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
54a4c61
)
diff --git
a/builtin-pickaxe.c
b/builtin-pickaxe.c
index b53c7b061762e1c9fa0d3ef48405431e8a1526bb..200772c75afd0ddae9e3d9e5eb988a191f62563b 100644
(file)
--- 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 (!str
cmp("-L", arg) && ++i < argc
) {
+ else if (!str
ncmp("-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);