Re: [PATCH v2 3/7] log: do not free parents when walking reflog

2017-07-10 Thread Jeff King
On Sun, Jul 09, 2017 at 09:59:33AM -0700, Junio C Hamano wrote: > >> After step 6/7, we no longer "allow cycles in reflog ancestry", as > >> there will be no reflog ancestry to speak of ;-), so it would be > >> nice to remove the comment above in that step. But alternatively, > >> we can

Re: [PATCH v2 3/7] log: do not free parents when walking reflog

2017-07-09 Thread Junio C Hamano
Jeff King writes: > On Fri, Jul 07, 2017 at 10:10:54AM -0700, Junio C Hamano wrote: > >> > diff --git a/builtin/log.c b/builtin/log.c >> > index 8ca1de9894..9c8bb3b5c3 100644 >> > --- a/builtin/log.c >> > +++ b/builtin/log.c >> > @@ -374,9 +374,9 @@ static int cmd_log_walk(struct

Re: [PATCH v2 3/7] log: do not free parents when walking reflog

2017-07-09 Thread Jeff King
On Fri, Jul 07, 2017 at 10:10:54AM -0700, Junio C Hamano wrote: > > diff --git a/builtin/log.c b/builtin/log.c > > index 8ca1de9894..9c8bb3b5c3 100644 > > --- a/builtin/log.c > > +++ b/builtin/log.c > > @@ -374,9 +374,9 @@ static int cmd_log_walk(struct rev_info *rev) > > if

Re: [PATCH v2 3/7] log: do not free parents when walking reflog

2017-07-07 Thread Junio C Hamano
Jeff King writes: > 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