X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=sha1_name.c;h=faea58dc8c27de23e8fbaff17b39cb9e57708510;hb=50aaeca008194854dcc90836edaff58b9be6e0fc;hp=709ff2eee64cf106191ad274bede82a95d00e2a3;hpb=c0791f365e8024c35321a2c53856c3c63cd54299;p=git.git diff --git a/sha1_name.c b/sha1_name.c index 709ff2eee..faea58dc8 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -208,9 +208,7 @@ const char *find_unique_abbrev(const unsigned char *sha1, int len) if (exists ? !status : status == SHORT_NAME_NOT_FOUND) { - int cut_at = len + unique_abbrev_extra_length; - cut_at = (cut_at < 40) ? cut_at : 40; - hex[cut_at] = 0; + hex[len] = 0; return hex; } len++;