From: Jonathan Nieder Date: Tue, 28 May 2013 16:28:16 GMT Subject: Re: [PATCH] git clone depth of 0 not possible. Message-ID: In-Reply-To: <20130528091812.GG25742@login.drsnuggles.stderr.nl> Matthijs Kooijman wrote: > 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