Re: [PATCH/GSoC/RFC] fetch: git fetch --deepen

2015-03-17 Thread Duy Nguyen
On Mon, Mar 16, 2015 at 11:10 PM, Dongcan Jiang dongcan.ji...@gmail.com wrote: Hi Duy, Sorry for my late response. we need to make sure that upload-pack barf if some client sends both deepen and depth. Actually, in my current design, when client just wants depth, it sends depth N; when

Re: [PATCH/GSoC/RFC] fetch: git fetch --deepen

2015-03-17 Thread Dongcan Jiang
C Git is not the only client that can talk to upload-pack. A buggy client may send both. The least we need is make sure it would not crash or break the server security in any way. But if we have to consider that, we may as well reject with a clear message, which would help the client writer.

Re: [PATCH/GSoC/RFC] fetch: git fetch --deepen

2015-03-16 Thread Dongcan Jiang
Hi Duy, Sorry for my late response. we need to make sure that upload-pack barf if some client sends both deepen and depth. Actually, in my current design, when client just wants depth, it sends depth N; when it want deepen, it sends depth N as well as depth_deepen. For the latter case, it

Re: [PATCH/GSoC/RFC] fetch: git fetch --deepen

2015-03-16 Thread Dongcan Jiang
Hi Junio, Sorry for my late response. As this operation is not about moving _any_ refs, whether local branches or remote-tracking branches, any ref that used to point at commit B before you executed fetch --deepen would point at the same commit after the command finishes. Thanks for

Re: [PATCH/GSoC/RFC] fetch: git fetch --deepen

2015-03-16 Thread Dongcan Jiang
Hi Eric, Sorry for my late response. Thank you for your suggestions! I will try to use them in my next patch version. Best Regards, Dongcan 2015-03-14 3:42 GMT+08:00 Eric Sunshine sunsh...@sunshineco.com: On Fri, Mar 13, 2015 at 9:04 AM, Dongcan Jiang dongcan.ji...@gmail.com wrote: This

Re: [PATCH/GSoC/RFC] fetch: git fetch --deepen

2015-03-14 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Sat, Mar 14, 2015 at 12:35 PM, Junio C Hamano gits...@pobox.com wrote: Dongcan Jiang dongcan.ji...@gmail.com writes: What does (you) exactly mean in [1]? The local branch or the local remote ref? As this operation is not about moving _any_ refs,

Re: [PATCH/GSoC/RFC] fetch: git fetch --deepen

2015-03-14 Thread Duy Nguyen
On Sat, Mar 14, 2015 at 12:35 PM, Junio C Hamano gits...@pobox.com wrote: Dongcan Jiang dongcan.ji...@gmail.com writes: What does (you) exactly mean in [1]? The local branch or the local remote ref? As this operation is not about moving _any_ refs, whether local branches or remote-tracking

Re: [PATCH/GSoC/RFC] fetch: git fetch --deepen

2015-03-14 Thread Duy Nguyen
On Fri, Mar 13, 2015 at 8:04 PM, Dongcan Jiang dongcan.ji...@gmail.com wrote: @@ -317,7 +318,7 @@ static int find_common(struct fetch_pack_args *args, if (is_repository_shallow()) write_shallow_commits(req_buf, 1, NULL); if (args-depth 0) -

Re: [PATCH/GSoC/RFC] fetch: git fetch --deepen

2015-03-13 Thread Eric Sunshine
On Fri, Mar 13, 2015 at 9:04 AM, Dongcan Jiang dongcan.ji...@gmail.com wrote: This patch is just for discusstion. An option --deepen is added to 'git fetch'. When it comes to '--deepen', git should fetch N more commits ahead the local shallow commit, where N is indicated by '--depth=N'. [1]

Re: [PATCH/GSoC/RFC] fetch: git fetch --deepen

2015-03-13 Thread Junio C Hamano
Dongcan Jiang dongcan.ji...@gmail.com writes: This patch is just for discusstion. An option --deepen is added to 'git fetch'. When it comes to '--deepen', git should fetch N more commits ahead the local shallow commit, where N is indicated by '--depth=N'. [1] e.g. (upstream)

[PATCH/GSoC/RFC] fetch: git fetch --deepen

2015-03-13 Thread Dongcan Jiang
This patch is just for discusstion. An option --deepen is added to 'git fetch'. When it comes to '--deepen', git should fetch N more commits ahead the local shallow commit, where N is indicated by '--depth=N'. [1] e.g. (upstream) ---o---o---o---A---B (you) A---B After