Re: [PATCH 17/18] t4202: mark bogus head hash test with REFFILES
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Apr 26, 2021, 18:02 UTC
- Message-ID
- <CAFQ2z_Ogj__y5-=Re+WOvE12rnMU4OmF9_9wfq+U20bL-xSWZg@mail.gmail.com>
- In-Reply-To
- <87eef43yjq.fsf@evledraar.gmail.com>
On Wed, Apr 21, 2021 at 9:08 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 9 quoted lines
> > In reftable, hashes are correctly formed by design
>
> With the file backend this hits this in revision.c:
>
> if (!refname || !(flags & REF_ISSYMREF) || (flags & REF_ISBROKEN))
> die(_("your current branch appears to be broken"));
>
> There's a REF_ISBROKEN is the reftable code, so is hitting this codepath
> impossible under reftable and therefore we won't need this test at all?I've removed the REF_ISBROKEN bit. It would only trigger in case of unknown record_types, and I made it a BUG instead.
-- 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