desc.buf = tree->buffer;
desc.size = tree->size;
if (!desc.buf) {
- char type[20];
- void *data = read_sha1_file(sha1, type, &desc.size);
+ enum object_type type;
+ void *data = read_sha1_file(sha1, &type, &desc.size);
if (!data) {
tree->object.flags |= INCOMPLETE;
return 0;
const char *arg = argv[i];
if (!strcmp(arg, "--dry-run") || !strcmp(arg, "-n"))
cb.dry_run = 1;
- else if (!strncmp(arg, "--expire=", 9))
+ else if (!prefixcmp(arg, "--expire="))
cb.expire_total = approxidate(arg + 9);
- else if (!strncmp(arg, "--expire-unreachable=", 21))
+ else if (!prefixcmp(arg, "--expire-unreachable="))
cb.expire_unreachable = approxidate(arg + 21);
else if (!strcmp(arg, "--stale-fix"))
cb.stalefix = 1;