diff options
author | Jeff King <peff@peff.net> | 2017-07-09 13:13:51 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-09 20:00:05 +0300 |
commit | 822601e8303270aebed493b11e0988a75f2646b8 (patch) | |
tree | eaca450db93d497a5a0609c5ddf3f045e4710520 /builtin/log.c | |
parent | 82fd0f4a4b2c394ddba279eab7072fe87b750d2e (diff) |
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>
Diffstat (limited to 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c index 8ca1de9894..cf303b2c06 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -372,7 +372,10 @@ 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); |