Re: [PATCH 2/2] refs: set the repo in debug_ref_store.base

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 22, 2021 at 6:58 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> "Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
>
> > From: Han-Wen Nienhuys <hanwen@xxxxxxxxxx>
> >
> > This is for consistency with the files backend.
>
> Hmmmm.  Could you explain what it exactly means?
>
> I can see that files_ref_store structure has the .repo member and
> files_ref_store_create() uses it to remember which repository the
> ref store is for, but that is an implementation detail that is not
> exposed outside the files backend, isn't it?
>
> To put it differently, what is broken with the current code that
> leaves the .repo member in refs->base uninitialized?  We are
> presumably helping the caller that wants to know the repository the
> ref store belongs to via this pointer with this change---what is
> that caller?

It's confusing for the base ref_store to have fields that are
sometimes set and sometimes not. I sent an alternate take on this as
v2; hope you like that better.

(sorry, I forgot to update the cover letter.)

-- 
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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux