git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 1/2] refs: make _advance() check struct repo, not flag

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Sep 16, 2021, 17:26 UTC
Message-ID
<20210916172609.1074157-1-jonathantanmy@google.com>
In-Reply-To
<CAFQ2z_ML_g6DTiG92srq8UCCu_D8bi6z1mP_znt24TJagVfi2g@mail.gmail.com>
Show 12 quoted lines
> On Wed, Sep 15, 2021 at 12:41 AM Glen Choo <chooglen@google.com> wrote:
> > In the current state of affairs, the files ref store and the packed ref
> > store seem to behave as a single logical ref database. An example of
> > this (that I care about in particular) is in refs/files-backend.c where
> > the files backend validates oids using the_repository's odb.
> > refs/packed-backend.c doesn't do any such validation, and presumably
> > just relies on the correctness of refs/files-backend.c. I assume that
> > this also explains why some functions in refs_be_packed are stubs.
> 
> The loose/packed storage is implemented in terms of files backend (the
> public entry point) that defers to a packed backend in some cases. The
> latter is implemented as a ref backend, but for no good reason.
Yes, the packed backend doesn't need to be a ref backend.
> I think Jonathan is right, but I also think that teasing apart the ref
> backend and the ODB is premature until the ref backend itself is a
> strongly enforced abstraction boundary.
I think both efforts can proceed independently.
Previous: Han-Wen NienhuysNext: Junio C Hamano
Message 7 of 11 in “First steps towards iterating over submodule refs”
  1. 0/2 First steps towards iterating over submodule refsJonathan Tan, Aug 25, 2021
  2. 1/2 refs: make _advance() check struct repo, not flagJonathan Tan, Aug 25, 2021
  3. Han-Wen NienhuysAug 26, 2021
  4. Jonathan TanAug 26, 2021
  5. Glen ChooSep 14, 2021
  6. Han-Wen NienhuysSep 15, 2021
  7. Jonathan TanSep 16, 2021
  8. Junio C HamanoSep 16, 2021
  9. Jonathan TanSep 16, 2021
  10. Jonathan TanSep 16, 2021
  11. 2/2 refs: add repo paramater to _iterator_peel()Jonathan Tan, Aug 25, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.