object-store: migrate alternates struct and functions from cache.h
[gitweb.git] / builtin / show-ref.c
index 013d241abc09be76c318dbc25d5fb3b40ade7b3a..41e5e71cad660d26ddc90ffeaa383fd7bf10f79f 100644 (file)
@@ -38,7 +38,7 @@ static void show_one(const char *refname, const struct object_id *oid)
        if (!deref_tags)
                return;
 
-       if (!peel_ref(refname, peeled.hash)) {
+       if (!peel_ref(refname, &peeled)) {
                hex = find_unique_abbrev(peeled.hash, abbrev);
                printf("%s %s^{}\n", hex, refname);
        }
@@ -197,7 +197,7 @@ int cmd_show_ref(int argc, const char **argv, const char *prefix)
                        struct object_id oid;
 
                        if ((starts_with(*pattern, "refs/") || !strcmp(*pattern, "HEAD")) &&
-                           !read_ref(*pattern, oid.hash)) {
+                           !read_ref(*pattern, &oid)) {
                                show_one(*pattern, &oid);
                        }
                        else if (!quiet)