Re: [PATCH v7 23/28] Reftable support for git-core
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- May 18, 2021, 13:18 UTC
- Message-ID
- <CAFQ2z_Os02GHCcPX0Hcin7+va232Di5wFBbdbOBqEehJvTFbFA@mail.gmail.com>
- In-Reply-To
- <f5711aa9-e70f-8bb1-09d9-4f283b010d46@ahunt.org>
On Tue, May 4, 2021 at 7:24 PM Andrzej Hunt <andrzej@ahunt.org> wrote:
Show 13 quoted lines
> > + } else {
> > + oidread(&old_id, ref.value.val1);
> > + }
>
> This seems to assume that 'ref.value_type == REFTABLE_REF_VAL1' - but do
> we expect to have to handle the other types
> (REFTABLE_REF_VAL2/REFTABLE_REF_SYMREF)? When I run tests in seen
> against ASAN I see the following errors in t0031, which suggests we're
> running this code against REFTABLE_REF_SYMREF too - but I don't know if
> that means that this code should be able to handle the other ref types
> or if there's a bug higher up the stack. (AFAIUI REFTABLE_REF_DELETION
> is already handled because reftable_table_read_ref() already returns 1
> for deletion, but the other cases seem valid?)Curious. I didn't know it was supported to create symrefs in a transaction, but I've added an assert to make sure this doesn't trigger any sanitizers.
-- 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