diff options
author | Jeff King <peff@peff.net> | 2017-07-09 06:13:51 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-09 10:00:05 -0700 |
commit | 822601e8303270aebed493b11e0988a75f2646b8 (patch) | |
tree | eaca450db93d497a5a0609c5ddf3f045e4710520 | |
parent | 82fd0f4a4b2c394ddba279eab7072fe87b750d2e (diff) | |
download | git-822601e8303270aebed493b11e0988a75f2646b8.tar.gz git-822601e8303270aebed493b11e0988a75f2646b8.tar.xz |
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>
-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 8ca1de989..cf303b2c0 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); |