Re: [PATCH 3/8] commit-graph.c: peel refs in 'add_ref_to_set'
On Wed, May 13, 2020 at 01:48:48PM -0600, Taylor Blau wrote:
Show 12 quoted lines
> > Alternatively, you could do this without a struct copy at all with:
> >
> > if (!peel_ref(...))
> > oid = peeled;
> > oidset_insert(..., oid);
> >
> > which is actually a bit cheaper.
>
> Makes sense, I think this version is the better of the two that you
> suggested here. I noticed one small thing which is that since peeled is
> only on the stack, I think we actually want 'oid = &peeled', but
> otherwise I took this as-is.
Yes, definitely. That's what I get for writing code in my email editor. :)
-Peff