Re: [PATCH 1/3] rev-parse: support OPT_NUMBER_CALLBACK in --parseopt

2014-03-04 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > If the option spec is > > -NUM Help string > > then rev-parse will accept and parse -([0-9]+) and return "-NUM $1" Even though the hardcoded "NUM" token initially gave me a knee-jerk "Yuck" reaction, that literal option name is very unlikely to be desired by scrip

[PATCH 1/3] rev-parse: support OPT_NUMBER_CALLBACK in --parseopt

2014-03-01 Thread Nguyễn Thái Ngọc Duy
If the option spec is -NUM Help string then rev-parse will accept and parse -([0-9]+) and return "-NUM $1" Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/rev-parse.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 45