Re: [PATCH 6/8] refs: clear errno return in refs_resolve_ref_unsafe()
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Jun 10, 2021, 11:45 UTC
- Message-ID
- <CAFQ2z_PL3Envot1oAg7-vwWyx6taJfD4W_1PEByfDFT8kXgOUA@mail.gmail.com>
- In-Reply-To
- <20210603025340.349224-1-jonathantanmy@google.com>
On Thu, Jun 3, 2021 at 4:53 AM Jonathan Tan <jonathantanmy@google.com> wrote:
Show 19 quoted lines
> > > @@ -1685,10 +1685,11 @@ int refs_read_raw_ref(struct ref_store *ref_store, const char *refname, > > } > > > > /* This function needs to return a meaningful errno on failure */ > > -const char *refs_resolve_ref_unsafe(struct ref_store *refs, > > - const char *refname, > > - int resolve_flags, > > - struct object_id *oid, int *flags) > > +static const char *refs_resolve_ref_unsafe_errno(struct ref_store *refs, > > + const char *refname, > > + int resolve_flags, > > + struct object_id *oid, > > + int *flags) > > So a third function (refs_resolve_ref_unsafe_errno() - not to be > confused with refs_resolve_ref_unsafe_with_errno(), which has an extra > "with")? Couldn't we just swap the other 2 functions directly instead of > going through this intermediary?
I've clarified the name. I've done it this way, because it keeps the diff small. Swapping the functions would require code changes that I thought would be more work to review.
-- 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