]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/helper/test-sha1-array.c
Convert sha1_array_for_each_unique and for_each_abbrev to object_id
[thirdparty/git.git] / t / helper / test-sha1-array.c
index 36805118495f7dbb2a38c839ac051c17da5892b3..2f3d406b63ac8f8a1d6e3b91938994519af7cd90 100644 (file)
@@ -1,9 +1,9 @@
 #include "cache.h"
 #include "sha1-array.h"
 
-static int print_sha1(const unsigned char sha1[20], void *data)
+static int print_oid(const struct object_id *oid, void *data)
 {
-       puts(sha1_to_hex(sha1));
+       puts(oid_to_hex(oid));
        return 0;
 }
 
@@ -27,7 +27,7 @@ int cmd_main(int argc, const char **argv)
                } else if (!strcmp(line.buf, "clear"))
                        sha1_array_clear(&array);
                else if (!strcmp(line.buf, "for_each_unique"))
-                       sha1_array_for_each_unique(&array, print_sha1, NULL);
+                       sha1_array_for_each_unique(&array, print_oid, NULL);
                else
                        die("unknown command: %s", line.buf);
        }