Re: [PATCH 4/4] promisor-remote: teach lazy-fetch in any repo
- From
Elijah Newren <newren@gmail.com>
- Date
- Jun 5, 2021, 03:48 UTC
- Message-ID
- <CABPp-BFz1gCcNKzGcpp=N7eeE9F9mqonLUS89aQRvOf8zMJcsQ@mail.gmail.com>
- In-Reply-To
- <CABPp-BGeOVQokV+zg2-PUcmjEQ8+jmn6e=UeE=cOn=-Qm32p_Q@mail.gmail.com>
A quick update...
On Fri, Jun 4, 2021 at 2:35 PM Elijah Newren <newren@gmail.com> wrote:
> > On Tue, Jun 1, 2021 at 2:38 PM Jonathan Tan <jonathantanmy@google.com> wrote: > >
...
Show 28 quoted lines
> > diff --git a/object-file.c b/object-file.c
> > index f233b440b2..ebf273e9e7 100644
> > --- a/object-file.c
> > +++ b/object-file.c
> > @@ -1570,15 +1570,12 @@ static int do_oid_object_info_extended(struct repository *r,
> > }
> >
> > /* Check if it is a missing object */
> > - if (fetch_if_missing && has_promisor_remote() &&
> > - !already_retried && r == the_repository &&
> > + if (fetch_if_missing && repo_has_promisor_remote(r) &&
> > + !already_retried &&
>
> So here you removed the special check against the_repository while
> looking for promisor_remotes. There are other such special checks in
> the code; I also see:
>
> diff.c: if (options->repo == the_repository && has_promisor_remote() &&
> diffcore-break.c: if (r == the_repository && has_promisor_remote()) {
> diffcore-rename.c: if (r == the_repository && has_promisor_remote()) {
>
> and a series I'm planning to submit soon will add another to merge.ort.c.
>
> Do these need to all be fixed as part of the partial clone submodule
> support as well? Do I need to change anything about my series? I
> guess since I'm asking that, I should probably submit it first so you
> can actually see it and answer my question. (And the timing may be
> good since the area is fresh in your memory...)That other topic is now over here: https://lore.kernel.org/git/pull.969.git.1622856485.gitgitgadget@gmail.com/T/#t