log: clarify comment about reflog cycles
When we're walking reflogs, we leave the commit buffer and parents in place. A comment explains that this is due to "cycles". But the interesting thing is the unsaid implication: that the cycles (plus our clearing of the SEEN flag) will cause us to show commits multiple times. Let's spell it out. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
82fd0f4a4b
commit
822601e830
|
@ -372,7 +372,10 @@ static int cmd_log_walk(struct rev_info *rev)
|
||||||
*/
|
*/
|
||||||
rev->max_count++;
|
rev->max_count++;
|
||||||
if (!rev->reflog_info) {
|
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_buffer(commit);
|
||||||
}
|
}
|
||||||
free_commit_list(commit->parents);
|
free_commit_list(commit->parents);
|
||||||
|
|
Loading…
Reference in New Issue