Re: [PATCH v3 23/35] fetch-pack: support shallow requests

2018-02-23 Thread Brandon Williams
On 02/23, Jonathan Tan wrote:
> On Tue,  6 Feb 2018 17:13:00 -0800
> Brandon Williams  wrote:
> 
> > @@ -1090,6 +1110,10 @@ static int send_fetch_request(int fd_out, const 
> > struct fetch_pack_args *args,
> > if (prefer_ofs_delta)
> > packet_buf_write(_buf, "ofs-delta");
> >  
> > +   /* Add shallow-info and deepen request */
> > +   if (server_supports_feature("fetch", "shallow", 1))
> > +   add_shallow_requests(_buf, args);
> 
> One more thing I observed when trying to implement the server side in
> JGit - the last argument should be 0, not 1, right? I don't think that
> "shallow" should be required on the server unless we really need it.

Good catch, I'll fix that.

-- 
Brandon Williams


Re: [PATCH v3 23/35] fetch-pack: support shallow requests

2018-02-23 Thread Jonathan Tan
On Tue,  6 Feb 2018 17:13:00 -0800
Brandon Williams  wrote:

> @@ -1090,6 +1110,10 @@ static int send_fetch_request(int fd_out, const struct 
> fetch_pack_args *args,
>   if (prefer_ofs_delta)
>   packet_buf_write(_buf, "ofs-delta");
>  
> + /* Add shallow-info and deepen request */
> + if (server_supports_feature("fetch", "shallow", 1))
> + add_shallow_requests(_buf, args);

One more thing I observed when trying to implement the server side in
JGit - the last argument should be 0, not 1, right? I don't think that
"shallow" should be required on the server unless we really need it.