X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/dc41a0018058c81ee9a0a2dc6e89f737d7c1c966..de83de276bef7509ab8255682595ad4521f3a193:/ui-log.c diff --git a/ui-log.c b/ui-log.c index 32b4c47..8028b27 100644 --- a/ui-log.c +++ b/ui-log.c @@ -249,11 +249,11 @@ static void print_commit(struct commit *commit, struct rev_info *revs) static const char *disambiguate_ref(const char *ref, int *must_free_result) { - unsigned char sha1[20]; + struct object_id oid; struct strbuf longref = STRBUF_INIT; strbuf_addf(&longref, "refs/heads/%s", ref); - if (get_sha1(longref.buf, sha1) == 0) { + if (get_sha1(longref.buf, oid.hash) == 0) { *must_free_result = 1; return strbuf_detach(&longref, NULL); }