diff options
Diffstat (limited to 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/builtin/log.c b/builtin/log.c index c6362cf92e..5ffc380bd7 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -372,11 +372,14 @@ static int cmd_log_walk(struct rev_info *rev) */ rev->max_count++; if (!rev->reflog_info) { - /* we allow cycles in reflog ancestry */ + /* + * We may show a given commit multiple times when + * walking the reflogs. + */ free_commit_buffer(commit); + free_commit_list(commit->parents); + commit->parents = NULL; } - free_commit_list(commit->parents); - commit->parents = NULL; if (saved_nrl < rev->diffopt.needed_rename_limit) saved_nrl = rev->diffopt.needed_rename_limit; if (rev->diffopt.degraded_cc_to_c) |