{
void *buffer;
unsigned long size;
+ int ret;
- buffer = read_object_with_reference(sha1, "tree", &size, 0);
+ buffer = read_object_with_reference(sha1, "tree", &size, NULL);
if (!buffer)
return -1;
- return read_tree(buffer, size, stage);
+ ret = read_tree(buffer, size, stage);
+ free(buffer);
+ return ret;
}
static char *lockfile_name;
}
}
-static char *read_tree_usage = "read-tree (<sha> | -m <sha1> [<sha2> <sha3>])";
+static char *read_tree_usage = "git-read-tree (<sha> | -m <sha1> [<sha2> <sha3>])";
int main(int argc, char **argv)
{
merge = 1;
continue;
}
- if (get_sha1_hex(arg, sha1) < 0)
+ if (get_sha1(arg, sha1) < 0)
usage(read_tree_usage);
if (stage > 3)
usage(read_tree_usage);