Re: [PATCH] git clone depth of 0 not possible.

2013-07-11 Thread Matthijs Kooijman
Hi Junio, While implementing the above, I noticed my fix now introduced an off-by-one error the other way. When investigating, I found this commit: commit 682c7d2f1a2d1a5443777237450505738af2ff1a Author: Nguyễn Thái Ngọc Duy pclo...@gmail.com Date: Fri Jan 11 16:05:47

Re: [PATCH] git clone depth of 0 not possible.

2013-07-09 Thread Matthijs Kooijman
Hi Junio, Doing it correctly (in the shorter term) would involve: - adding a capability on the sending side fixed-off-by-one-depth to the protocol, and teaching the sending side to advertise the capability; - teaching the requestor that got --depth=N from the end user to

Re: [PATCH] git clone depth of 0 not possible.

2013-06-02 Thread Junio C Hamano
Matthijs Kooijman matth...@stdin.nl writes: Doing it correctly (in the shorter term) would involve: Given below suggestion, I take it you don't like what Jonathan proposed (changing the meaning of the deepen parameter in the protocol so that the server effectively decides how to interpret

Re: [PATCH] git clone depth of 0 not possible.

2013-05-30 Thread Matthijs Kooijman
Hi Junio, On Tue, May 28, 2013 at 10:04:46AM -0700, Junio C Hamano wrote: Matthijs Kooijman matth...@stdin.nl writes: Did you consider how to implement this? Looking at the code, it seems the deepen parameter in the wire protocol now means: - 0: Do not change anything about the

Re: [PATCH] git clone depth of 0 not possible.

2013-05-28 Thread Matthijs Kooijman
Hi Junio, I'm interested in getting a fetch tip commit only feature into git, I'll probably look into creating a patch for this. Sounds buggy. Would anything break if we were to make --depth=1 mean 1 deep, including the tip commit? As long as we do not change the meaning of the shallow

Re: [PATCH] git clone depth of 0 not possible.

2013-05-28 Thread Matthijs Kooijman
Hi Jonathan, Did you consider how to implement this? Looking at the code, it seems the deepen parameter in the wire protocol now means: - 0: Do not change anything about the shallowness (i.e., fetch everything from the shallow root to the tip). - 0: Create new shallow commits at

Re: [PATCH] git clone depth of 0 not possible.

2013-05-28 Thread Jonathan Nieder
Matthijs Kooijman wrote: In other words: we won't break existing clients if we suddenly send back one less commit than before, since the client just sends over what it wants and then assumes that whatever it gets back is really what it wanted? Yes, depending on your definition of break. An

Re: [PATCH] git clone depth of 0 not possible.

2013-05-28 Thread Junio C Hamano
Matthijs Kooijman matth...@stdin.nl writes: Did you consider how to implement this? Looking at the code, it seems the deepen parameter in the wire protocol now means: - 0: Do not change anything about the shallowness (i.e., fetch everything from the shallow root to the tip). - 0:

Re: [PATCH] git clone depth of 0 not possible.

2013-01-08 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Tue, Jan 8, 2013 at 1:54 PM, Junio C Hamano gits...@pobox.com wrote: Sounds buggy. Would anything break if we were to make --depth=1 mean 1 deep, including the tip commit? As long as we do not change the meaning of the shallow count going over the

Re: [PATCH] git clone depth of 0 not possible.

2013-01-08 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: I think we need a protocol update to fix this; instead of sending Now I want your tips and N commits behind it, please update my shallow bottom accordingly, which creates the above by giving you Z and 3 generations back and updates your cut-off point

Re: [PATCH] git clone depth of 0 not possible.

2013-01-08 Thread Duy Nguyen
On Tue, Jan 8, 2013 at 2:36 PM, Junio C Hamano gits...@pobox.com wrote: Speaking of --depth, I think in Git 2.0 we should fix the semantics of deepening done with git fetch. Speaking of 2.0, we should support depth per ref. Well we don't have to wait until 2.0 because we could just add shallow2

Re: [PATCH] git clone depth of 0 not possible.

2013-01-08 Thread Stefan Beller
On 01/08/2013 03:28 PM, Duy Nguyen wrote: On Tue, Jan 8, 2013 at 2:36 PM, Junio C Hamano gits...@pobox.com wrote: Speaking of --depth, I think in Git 2.0 we should fix the semantics of deepening done with git fetch. Speaking of 2.0, we should support depth per ref. Well we don't have to

Re: [PATCH] git clone depth of 0 not possible.

2013-01-08 Thread Duy Nguyen
On Tue, Jan 8, 2013 at 9:32 PM, Stefan Beller stefanbel...@googlemail.com wrote: On 01/08/2013 03:28 PM, Duy Nguyen wrote: On Tue, Jan 8, 2013 at 2:36 PM, Junio C Hamano gits...@pobox.com wrote: Speaking of --depth, I think in Git 2.0 we should fix the semantics of deepening done with git

[PATCH] git clone depth of 0 not possible.

2013-01-07 Thread Stefan Beller
Currently it is not possible to have a shallow depth of just 0, i.e. only one commit in that repository after cloning. The minimum number of commits is 2, caused by depth=1. I had no good idea how to add this behavior to git clone as the depth variable in git_transport_options struct (file

Re: [PATCH] git clone depth of 0 not possible.

2013-01-07 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Stefan Beller wrote: Currently it is not possible to have a shallow depth of just 0, i.e. only one commit in that repository after cloning. The minimum number of commits is 2, caused by depth=1. Sounds buggy. Would anything break if we were to

Re: [PATCH] git clone depth of 0 not possible.

2013-01-07 Thread Duy Nguyen
On Tue, Jan 8, 2013 at 1:06 AM, Stefan Beller stefanbel...@googlemail.com wrote: Currently it is not possible to have a shallow depth of just 0, i.e. only one commit in that repository after cloning. The minimum number of commits is 2, caused by depth=1. I had no good idea how to add this

Re: [PATCH] git clone depth of 0 not possible.

2013-01-07 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Jonathan Nieder jrnie...@gmail.com writes: Stefan Beller wrote: Currently it is not possible to have a shallow depth of just 0, i.e. only one commit in that repository after cloning. The minimum number of commits is 2, caused by depth=1. Sounds

Re: [PATCH] git clone depth of 0 not possible.

2013-01-07 Thread Duy Nguyen
On Tue, Jan 8, 2013 at 1:54 PM, Junio C Hamano gits...@pobox.com wrote: Sounds buggy. Would anything break if we were to make --depth=1 mean 1 deep, including the tip commit? As long as we do not change the meaning of the shallow count going over the wire (i.e. the number we receive from the