Skip to content

Commit

Permalink
git-rev-parse: Fix --short= option parsing
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
  • Loading branch information
Jonas Fonseca authored and Junio C Hamano committed Feb 18, 2006
1 parent b5b1699 commit 44de0da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rev-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ int main(int argc, char **argv)
continue;
}
if (!strcmp(arg, "--short") ||
!strncmp(arg, "--short=", 9)) {
!strncmp(arg, "--short=", 8)) {
filter &= ~(DO_FLAGS|DO_NOREV);
verify = 1;
abbrev = DEFAULT_ABBREV;
if (arg[8] == '=')
abbrev = strtoul(arg + 9, NULL, 10);
if (arg[7] == '=')
abbrev = strtoul(arg + 8, NULL, 10);
if (abbrev < MINIMUM_ABBREV)
abbrev = MINIMUM_ABBREV;
else if (40 <= abbrev)
Expand Down

0 comments on commit 44de0da

Please sign in to comment.