Re: [PATCH] git clone depth of 0 not possible.
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- May 28, 2013, 16:28 UTC
- Message-ID
- <CAFzf2Xx2mMO5XJ8n1UsUMMpDvi+KMUt9DpRe80X4zpG=THxSPw@mail.gmail.com>
- In-Reply-To
- <20130528091812.GG25742@login.drsnuggles.stderr.nl>
Matthijs Kooijman wrote:
Show 11 quoted lines
> 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 depth commits below the tip (so > depth == 1 means tip and one below). > - INFINITE_DEPTH (0x7fffffff): Remove all shallowness and fetch > complete history. > > Given this, I'm not sure how one can express "fetch the tip and nothing > below that", since depth == 0 already has a different meaning.
If I remember correctly, what we discussed is just changing the protocol to "5 means a depth of 5". The client already trusts what the server provides.
Thanks and hope that helps, Jonathan