From: Junio C Hamano Date: Thu, 02 Apr 2009 02:33:08 GMT Subject: Re: "git clone --depth " producing history with commits? Message-ID: <7veiwbokd7.fsf@gitster.siamese.dyndns.org> In-Reply-To: Johannes Schindelin writes: > On Wed, 1 Apr 2009, Sebastian Pipping wrote: > >> Sebastian Pipping wrote: >> > Is "git clone --depth 1 " expected to give a history >> > with 2 commits? "--depth 2" gives 3 commits, "--depth 0" all. >> > >> > Is that by design or a bug? >> >> Anyone? Is "git clone --depth 1 " really supposed to >> produce a history holding _two_ commits? Why so? > > Because storing _no_ commit (according to you, that should happen with > --depth=0) would make no sense? But then you can error out upon such a request. > After all, if you want to clone, you want to clone at least _something_. I am a bit puzzled by your logic. If one is requested, shouldn't you give only one and not two?