Re: [PATCH] fetch: in partial clone, check presence of targets

2018-09-20 Thread Junio C Hamano
Jonathan Tan writes: > The hard part for me lies in how to communicate to future readers of the > code that they cannot remove this section to simplify the code. We would > need a more complicated comment, something like this: That suggests two things. - Perhaps quickfetch() is misnamed. It

Re: [PATCH] fetch: in partial clone, check presence of targets

2018-09-20 Thread Jonathan Tan
> Jonathan Tan writes: > > > + if (repository_format_partial_clone) { > > + /* > > +* For the purposes of the connectivity check, > > +* check_connected() considers all objects promised by > > +* promisor objects as existing, which means that the >

Re: [PATCH] fetch: in partial clone, check presence of targets

2018-09-20 Thread Junio C Hamano
Jonathan Tan writes: > diff --git a/builtin/fetch.c b/builtin/fetch.c > index 61bec5d21..e9640fe5a 100644 > --- a/builtin/fetch.c > +++ b/builtin/fetch.c > @@ -938,6 +938,25 @@ static int quickfetch(struct ref *ref_map) >*/ > if (deepen) > return -1; > + > + if

[PATCH] fetch: in partial clone, check presence of targets

2018-09-20 Thread Jonathan Tan
When fetching an object that is known as a promisor object to the local repository, the connectivity check in quickfetch() in builtin/fetch.c succeeds, causing object transfer to be bypassed. However, this should not happen if that object is merely promised and not actually present. Because this