]> asedeno.scripts.mit.edu Git - git.git/blobdiff - combine-diff.c
Merge branch 'js/commit-format'
[git.git] / combine-diff.c
index 044633d1643a533498d3f5aba86a35a4611f6ca7..9daa0cb9a95fe6c2176a927f093d8788d0195240 100644 (file)
@@ -92,14 +92,14 @@ struct sline {
 static char *grab_blob(const unsigned char *sha1, unsigned long *size)
 {
        char *blob;
-       char type[20];
+       enum object_type type;
        if (is_null_sha1(sha1)) {
                /* deleted blob */
                *size = 0;
                return xcalloc(1, 1);
        }
-       blob = read_sha1_file(sha1, type, size);
-       if (strcmp(type, blob_type))
+       blob = read_sha1_file(sha1, &type, size);
+       if (type != OBJ_BLOB)
                die("object '%s' is not a blob!", sha1_to_hex(sha1));
        return blob;
 }