refs: convert dwim_ref and expand_ref to struct object_id
[gitweb.git] / builtin / show-ref.c
index 013d241abc09be76c318dbc25d5fb3b40ade7b3a..cbb8cfc7d261d4cd3c01ba41705f69da10128c42 100644 (file)
@@ -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)