]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/helper/test-ref-store.c
refs: convert resolve_ref_unsafe to struct object_id
[thirdparty/git.git] / t / helper / test-ref-store.c
index cea3285ada4bc16bf07d227e8e83c0d7eb5961ac..d846c88ed26fb985af3cb6c9c03ec978069063a4 100644 (file)
@@ -127,15 +127,15 @@ static int cmd_for_each_ref(struct ref_store *refs, const char **argv)
 
 static int cmd_resolve_ref(struct ref_store *refs, const char **argv)
 {
-       unsigned char sha1[20];
+       struct object_id oid;
        const char *refname = notnull(*argv++, "refname");
        int resolve_flags = arg_flags(*argv++, "resolve-flags");
        int flags;
        const char *ref;
 
        ref = refs_resolve_ref_unsafe(refs, refname, resolve_flags,
-                                     sha1, &flags);
-       printf("%s %s 0x%x\n", sha1_to_hex(sha1), ref, flags);
+                                     &oid, &flags);
+       printf("%s %s 0x%x\n", oid_to_hex(&oid), ref, flags);
        return ref ? 0 : 1;
 }