summaryrefslogtreecommitdiff
path: root/builtin/show-ref.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2015-05-25 18:38:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-05-25 19:19:32 (GMT)
commita0cde90ebfe22d879fd9c272afdef9301ca8b51d (patch)
treec458ba8c711e07e9a798fe2685bfe57abe35f23d /builtin/show-ref.c
parentf0a011fa1f3030e49de9f316b02119b390c33e92 (diff)
downloadgit-a0cde90ebfe22d879fd9c272afdef9301ca8b51d.zip
git-a0cde90ebfe22d879fd9c272afdef9301ca8b51d.tar.gz
git-a0cde90ebfe22d879fd9c272afdef9301ca8b51d.tar.bz2
show_ref(): convert local variable peeled to object_id
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/show-ref.c')
-rw-r--r--builtin/show-ref.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 18f84fb..dfbc314 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;