From: Michael Haggerty Date: Mon, 25 May 2015 18:38:52 +0000 (+0000) Subject: show_ref(): convert local variable peeled to object_id X-Git-Tag: v2.5.0-rc0~54^2~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a0cde90ebfe22d879fd9c272afdef9301ca8b51d;p=git show_ref(): convert local variable peeled to object_id Signed-off-by: Michael Haggerty Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano --- diff --git a/builtin/show-ref.c b/builtin/show-ref.c index 18f84fbc53..dfbc314ac2 100644 --- a/builtin/show-ref.c +++ b/builtin/show-ref.c @@ -30,7 +30,7 @@ static int show_ref(const char *refname, const struct object_id *oid, int flag, void *cbdata) { const char *hex; - unsigned char peeled[20]; + struct object_id peeled; if (show_head && !strcmp(refname, "HEAD")) goto match; @@ -82,8 +82,8 @@ match: if (!deref_tags) return 0; - if (!peel_ref(refname, peeled)) { - hex = find_unique_abbrev(peeled, abbrev); + if (!peel_ref(refname, peeled.hash)) { + hex = find_unique_abbrev(peeled.hash, abbrev); printf("%s %s^{}\n", hex, refname); } return 0;