Re: [PATCH v7 6/6] Reftable support for git-core

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

 



On Thu, Feb 27, 2020 at 5:23 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> Han-Wen Nienhuys <hanwen@xxxxxxxxxx> writes:
>
> > So, the ref backend should manage the HEAD ref, but iteration should
> > not produce the HEAD ref.
>
> Yeah, as there is a dedicated API function head_ref().
>
> Things like ORIG_HEAD and MERGE_HEAD have always been curiosity
> outside the official API, but IIRC read_ref() and friends are
> prepared to read them [*1*], so the vocabulary may be unbounded [*2*].
>
> These won't be listed in for_each_ref() iteration, either (think of
> for_each_ref() as a filtered "ls -R .git/refs/" output).


currently the code says

 int refs_for_each_ref(struct ref_store *refs, each_ref_fn fn, void *cb_data)
 {
   return do_for_each_ref(refs, "", fn, 0, 0, cb_data);
 }

but it looks like this should do

   return do_for_each_ref(refs, "refs/", fn, 0, 0, cb_data);

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




[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