Re: [PATCH 10/10] reftable: make reftable_record a tagged union

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 8, 2021 at 5:47 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Perhaps reftable_record_for() can be implemented without changing
> the shape of the underlying reftable_record structure in an earlier
> step, then all the users of reftable_record instances can be
> migrated to call it, and then finally the shape of the structure and
> the implementation of reftable_record_for() can be updated?

We are going from

 reftable_ref_record ref = { 0 };
 reftable_record rec =  { 0 };
 record_from_ref_record(&rec, &ref);

to

 reftable_record rec =  { .type = BLOCK_TYPE_REF };

which is why this change is so nice.  reftable_record_for() is used in
just a few places, so it wouldn't make the change much smaller.

-- 
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--
Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux