projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-tar-tree: no more void pointer arithmetic
[git.git]
/
builtin-rev-list.c
diff --git
a/builtin-rev-list.c
b/builtin-rev-list.c
index
e885624
..
71353eb
100644
(file)
--- a/
builtin-rev-list.c
+++ b/
builtin-rev-list.c
@@
-89,6
+89,14
@@
static void show_commit(struct commit *commit)
printf("%s%c", pretty_header, hdr_termination);
}
fflush(stdout);
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,
}
static struct object_list **process_blob(struct blob *blob,
@@
-158,16
+166,16
@@
static void show_commit_list(struct rev_info *revs)
const char *name = pending->name;
if (obj->flags & (UNINTERESTING | SEEN))
continue;
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;
}
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;
}
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;
}
p = process_blob((struct blob *)obj, p, NULL, name);
continue;
}