We do not allow abbreviation shorter than 4 letters in other
parts of the system so do not attempt to generate such.
Noticed by Uwe Zeisberger.
Signed-off-by: Junio C Hamano <junkio@cox.net>
abbrev = DEFAULT_ABBREV;
if (arg[8] == '=')
abbrev = strtoul(arg + 9, NULL, 10);
- if (abbrev < 0 || 40 <= abbrev)
- abbrev = DEFAULT_ABBREV;
+ if (abbrev < MINIMUM_ABBREV)
+ abbrev = MINIMUM_ABBREV;
+ else if (40 <= abbrev)
+ abbrev = 40;
continue;
}
if (!strcmp(arg, "--sq")) {