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

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

 



On Fri, Feb 02, 2024 at 09:30:39AM +0100, Patrick Steinhardt wrote:
> 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

Attachment: signature.asc
Description: PGP signature


[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