X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=sha1_name.c;h=faea58dc8c27de23e8fbaff17b39cb9e57708510;hb=9029ebbe118dddfccae0dcbb921722257aef2ecd;hp=ceb9cdd860da78bf3fe0a1819846ded0e87fda8c;hpb=41cd7974b0b67b78c39bccc86718dbe19390f768;p=thirdparty%2Fgit.git diff --git a/sha1_name.c b/sha1_name.c index ceb9cdd860..faea58dc8c 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++; @@ -707,7 +705,7 @@ static int handle_one_ref(const char *path, } if (object->type != OBJ_COMMIT) return 0; - insert_by_date((struct commit *)object, list); + commit_list_insert_by_date((struct commit *)object, list); return 0; }