Code

convert object type handling from a string to a number
[git.git] / builtin-for-each-ref.c
index 14fff2b1c50b730416eae83f160a39e1006b0ec0..b11ca928d6ac353de888f0e80d24578c5803d769 100644 (file)
@@ -173,8 +173,8 @@ static void verify_format(const char *format)
  */
 static void *get_obj(const unsigned char *sha1, struct object **obj, unsigned long *sz, int *eaten)
 {
-       char type[20];
-       void *buf = read_sha1_file(sha1, type, sz);
+       enum object_type type;
+       void *buf = read_sha1_file(sha1, &type, sz);
 
        if (buf)
                *obj = parse_object_buffer(sha1, type, *sz, buf, eaten);