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

Re: [PATCH 1/2] refs: introduce reftable backend

From
Patrick Steinhardt <ps@pks.im>
Date
Feb 2, 2024, 10:52 UTC
Message-ID
<ZbzJWo-DBpGZiMO4@tanuki>
In-Reply-To
<ZbyoL3r7yEVYe35B@tanuki>
On Fri, Feb 02, 2024 at 09:30:39AM +0100, Patrick Steinhardt wrote:
Show 41 quoted lines
> On Thu, Feb 01, 2024 at 07:17:45AM -0800, Karthik Nayak wrote:
> > > +		iter->err = reftable_iterator_next_ref(&iter->iter, &iter->ref);
> > > +		if (iter->err)
> > > +			break;
> > > +
> > > +		/*
> > > +		 * The files backend only lists references contained in
> > > +		 * "refs/". We emulate the same behaviour here and thus skip
> > > +		 * all references that don't start with this prefix.
> > > +		 */
> > > +		if (!starts_with(iter->ref.refname, "refs/"))
> > > +			continue;
> > > +
> > 
> > Since my patch series [1] to print all refs is now merged to next, maybe
> > you could add this in?
> > 
> >     diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c
> >     index 895de0b273..3f4f905292 100644
> >     --- a/refs/reftable-backend.c
> >     +++ b/refs/reftable-backend.c
> >     @@ -348,11 +348,10 @@ static int
> > reftable_ref_iterator_advance(struct ref_iterator *ref_iterator)
> >      			break;
> > 
> >      		/*
> >     -		 * The files backend only lists references contained in
> >     -		 * "refs/". We emulate the same behaviour here and thus skip
> >     -		 * all references that don't start with this prefix.
> >     +		 * Unless the `DO_FOR_EACH_INCLUDE_ALL_REFS` flag is use, we only
> >     +		 * list references contained in "refs/" to mimic the file-backend.
> >      		 */
> >     -		if (!starts_with(iter->ref.refname, "refs/"))
> >     +		if (!(iter->flags & DO_FOR_EACH_INCLUDE_ALL_REFS) &&
> > !starts_with(iter->ref.refname, "refs/"))
> >      			continue;
> > 
> >      		if (iter->prefix &&
> 
> I'm still waiting for your patch series to hit `next` before making it a
> dependency of this series, but thanks for the patch!

Oops, didn't read this carefully enough and missed that it already is in `next`. I'll adapt accordingly in the next version, thanks!

Patrick
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 5 of 23 in “refs: introduce reftable backend”
  1. 0/2 refs: introduce reftable backendPatrick Steinhardt, Jan 30, 2024
  2. 1/2 refs: introduce reftable backendPatrick Steinhardt, Jan 30, 2024
  3. Karthik NayakFeb 1, 2024
  4. Patrick SteinhardtFeb 2, 2024
  5. Patrick SteinhardtFeb 2, 2024
  6. 2/2 ci: add jobs to test with the reftable backendPatrick Steinhardt, Jan 30, 2024
  7. Junio C HamanoJan 30, 2024
  8. 0/2 refs: introduce reftable backendPatrick Steinhardt, Feb 2, 2024
  9. 1/2 refs: introduce reftable backendPatrick Steinhardt, Feb 2, 2024
  10. 2/2 ci: add jobs to test with the reftable backendPatrick Steinhardt, Feb 2, 2024
  11. Karthik NayakFeb 2, 2024
  12. Junio C HamanoFeb 3, 2024
  13. Patrick SteinhardtFeb 4, 2024
  14. 0/2 refs: introduce reftable backendPatrick Steinhardt, Feb 5, 2024
  15. 1/2 refs: introduce reftable backendPatrick Steinhardt, Feb 5, 2024
  16. 2/2 ci: add jobs to test with the reftable backendPatrick Steinhardt, Feb 5, 2024
  17. Karthik NayakFeb 5, 2024
  18. 0/2 refs: introduce reftable backendPatrick Steinhardt, Feb 7, 2024
  19. 1/2 refs: introduce reftable backendPatrick Steinhardt, Feb 7, 2024
  20. Jeff KingFeb 7, 2024
  21. Patrick SteinhardtFeb 8, 2024
  22. Jeff KingFeb 15, 2024
  23. 2/2 ci: add jobs to test with the reftable backendPatrick Steinhardt, Feb 7, 2024

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.