| 88 | } |
| 89 | |
| 90 | int format_object_header(char *str, size_t size, enum object_type type, |
| 91 | size_t objsize) |
| 92 | { |
| 93 | const char *name = type_name(type); |
| 94 | |
| 95 | if (!name) |
| 96 | BUG("could not get a type name for 'enum object_type' value %d", type); |
| 97 | |
| 98 | return xsnprintf(str, size, "%s %"PRIuMAX, name, (uintmax_t)objsize) + 1; |
| 99 | } |
| 100 | |
| 101 | int check_object_signature(struct repository *r, const struct object_id *oid, |
| 102 | void *buf, unsigned long size, |