Re: [RFC PATCH] http: use --stdin and --keep when downloading pack

2019-02-21 Thread Jeff King
On Thu, Feb 21, 2019 at 10:49:48AM -0800, Jonathan Tan wrote: > > > - if (finalize_object_file(preq->tmpfile.buf, sha1_pack_name(p->sha1)) > > > - || finalize_object_file(tmp_idx, sha1_pack_index_name(p->sha1))) { > > > - free(tmp_idx); > > > - return -1; > > > + if (finish_comman

Re: [RFC PATCH] http: use --stdin and --keep when downloading pack

2019-02-21 Thread Junio C Hamano
Jonathan Tan writes: > When Git fetches a pack using dumb HTTP, it does at least 2 things > differently from when it fetches using fetch-pack or receive-pack: (1) > it reuses the server's name for the packfile (which incorporates a hash) > for the packfile, and (2) it does not create a .keep file

Re: [RFC PATCH] http: use --stdin and --keep when downloading pack

2019-02-21 Thread Jonathan Tan
> On Wed, Feb 20, 2019 at 04:14:47PM -0800, Jonathan Tan wrote: > > > This is part of the work of CDN offloading of fetch responses. > > > > I have plans to use the http_pack_request suite of functions to > > implement the part where we download from CDN over HTTP(S), but need > > this change to

Re: [RFC PATCH] http: use --stdin and --keep when downloading pack

2019-02-21 Thread Jeff King
On Wed, Feb 20, 2019 at 04:14:47PM -0800, Jonathan Tan wrote: > This is part of the work of CDN offloading of fetch responses. > > I have plans to use the http_pack_request suite of functions to > implement the part where we download from CDN over HTTP(S), but need > this change to be able to do

[RFC PATCH] http: use --stdin and --keep when downloading pack

2019-02-20 Thread Jonathan Tan
When Git fetches a pack using dumb HTTP, it does at least 2 things differently from when it fetches using fetch-pack or receive-pack: (1) it reuses the server's name for the packfile (which incorporates a hash) for the packfile, and (2) it does not create a .keep file to avoid race conditions with