git-rev-parse: Fix --short= option parsing
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Jonas Fonseca committed
Feb 18, 2006 at 02:10 UTC
44de0da4f908b6600647673e1236b0ca504a9c15
1 file changed
+3
-3
rev-parse.c
+3
-3
@@ -225,12 +225,12 @@ int main(int argc, char **argv)
225
continue;
226
}
227
if (!strcmp(arg, "--short") ||
228
- !strncmp(arg, "--short=", 9)) {
228
+ !strncmp(arg, "--short=", 8)) {
229
filter &= ~(DO_FLAGS|DO_NOREV);
230
verify = 1;
231
abbrev = DEFAULT_ABBREV;
232
- if (arg[8] == '=')
233
- abbrev = strtoul(arg + 9, NULL, 10);
232
+ if (arg[7] == '=')
233
+ abbrev = strtoul(arg + 8, NULL, 10);
234
if (abbrev < MINIMUM_ABBREV)
235
abbrev = MINIMUM_ABBREV;
236
else if (40 <= abbrev)