Re: [PATCH v4 13/15] Reftable support for git-core
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Apr 23, 2021, 10:22 UTC
- Message-ID
- <CAFQ2z_Pco4KhhE7S_8zBZ7hCwOH=DnxHoKE8zus7REdQaXCZiQ@mail.gmail.com>
- In-Reply-To
- <871ree8eto.fsf@evledraar.gmail.com>
On Thu, Jan 21, 2021 at 4:55 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 5 quoted lines
> I've been chasing down some edge cases in refs.c as part of another WIP > series I have and found that for this particular "errno" stuff we don't > have any test coverage. And with master & hanwen/reftable if I apply: > > - errno = EINVAL;
..
> All tests pass on both.
..
> That I can remove error checking/handling from this place means existing > general logic was faithfully copied without checking that we have a test > for it, or adding one.
I think that is an unfair characterization. The API documentation of read_raw_ref_fn says that implementations should return EINVAL for certain cases, so that's what I did. The point of having a documented internal API is that one doesn't have to double check what is behind the API.
-- 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