log: do not free parents when walking reflog
commitf35650dff6a4500e317803165b13cc087f48ee85
authorJeff King <peff@peff.net>
Fri, 7 Jul 2017 09:07:34 +0000 (7 05:07 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 9 Jul 2017 17:00:48 +0000 (9 10:00 -0700)
tree06834131d7a81eeb7f7dbb3271f12676be1c34c0
parent822601e8303270aebed493b11e0988a75f2646b8
log: do not free parents when walking reflog

When we're doing a reflog walk (instead of walking the
actual parent pointers), we may see commits multiple times.
For this reason, we hold on to the commit buffer for each
commit rather than freeing it after we've showed the commit.

We should do the same for the parent list. Right now this is
just a minor optimization. But once we refactor how reflog
walks are performed, keeping the parents will avoid
confusing us the second time we see the commit.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/log.c