From: Han-Wen Nienhuys Date: Thu, 10 Jun 2021 11:45:58 GMT Subject: Re: [PATCH 6/8] refs: clear errno return in refs_resolve_ref_unsafe() Message-ID: In-Reply-To: <20210603025340.349224-1-jonathantanmy@google.com> On Thu, Jun 3, 2021 at 4:53 AM Jonathan Tan wrote: > > > @@ -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