printf("%s%c", pretty_header, hdr_termination);
}
fflush(stdout);
+ if (commit->parents) {
+ free_commit_list(commit->parents);
+ commit->parents = NULL;
+ }
+ if (commit->buffer) {
+ free(commit->buffer);
+ commit->buffer = NULL;
+ }
}
static struct object_list **process_blob(struct blob *blob,
const char *name = pending->name;
if (obj->flags & (UNINTERESTING | SEEN))
continue;
- if (obj->type == tag_type) {
+ if (obj->type == TYPE_TAG) {
obj->flags |= SEEN;
p = add_object(obj, p, NULL, name);
continue;
}
- if (obj->type == tree_type) {
+ if (obj->type == TYPE_TREE) {
p = process_tree((struct tree *)obj, p, NULL, name);
continue;
}
- if (obj->type == blob_type) {
+ if (obj->type == TYPE_BLOB) {
p = process_blob((struct blob *)obj, p, NULL, name);
continue;
}