Re: [PATCH v3 5/7] object-file: only register submodule ODB if needed

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

 



> > @@ -1614,7 +1614,8 @@ static int do_oid_object_info_extended(struct repository *r,
> >  				break;
> >  		}
> >  
> > -		if (register_all_submodule_odb_as_alternates())
> > +		if (r == the_repository &&
> > +		    register_all_submodule_odb_as_alternates())
> >  			/* We added some alternates; retry */
> >  			continue;
> >  
> > -- 
> > 2.33.0.685.g46640cef36-goog
> > 
> 
> It looks like this is just a small bugfix, but can you expand on the
> implications here? What happens if r != the_repository?

The purpose of the quoted block (before and after the check added in
this patch) is so that reading submodule objects by reading them as if
they were in the_repository works, and it follows that this is only
necessary if we pass the_repository (because we are reading them as if
they were in the_repository). I'll add a comment explaining this.



[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