summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 40ab7c3)
raw | patch | inline | side by side (parent: 40ab7c3)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sat, 20 Jan 2007 21:28:16 +0000 (22:28 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 21 Jan 2007 06:58:42 +0000 (22:58 -0800) |
Since you can reset --hard to any revision you already had, when
traversing the reflog ancestry, we may not free() the commit buffer.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
traversing the reflog ancestry, we may not free() the commit buffer.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-log.c | patch | blob | history |
diff --git a/builtin-log.c b/builtin-log.c
index f3cff13edc80afad27b9f7930a0a736ba5aa6d16..13a3f9b25db3fb2746c21b2ce6327627c965c0ce 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
prepare_revision_walk(rev);
while ((commit = get_revision(rev)) != NULL) {
log_tree_commit(rev, commit);
- free(commit->buffer);
- commit->buffer = NULL;
+ if (!rev->reflog_info) {
+ /* we allow cycles in reflog ancestry */
+ free(commit->buffer);
+ commit->buffer = NULL;
+ }
free_commit_list(commit->parents);
commit->parents = NULL;
}