{"thread":{"id":"18574","subject":"\"git clone --depth <depth>\" producing history with <depth + 1> commits?","startedAt":"2009-03-26T17:00:00Z","lastAt":"2009-04-02T11:00:57Z","messageCount":6,"participants":["Sebastian Pipping","Johannes Schindelin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"109556","messageId":"49CBB490.8040908@hartwork.org","threadId":"18574","inReplyTo":null,"subject":"\"git clone --depth <depth>\" producing history with <depth + 1> commits?","fromName":"Sebastian Pipping","fromEmail":"webmaster@hartwork.org","sentAt":"2009-03-26T17:00:00Z","receivedAt":"2009-03-26T17:00:00Z","isPatch":false,"sender":{"key":"webmaster@hartwork.org","avatar":null},"body":"Hello!\n\n\nIs \"git clone --depth 1 <ropository>\" expected to give a history\nwith 2 commits?  \"--depth 2\" gives 3 commits, \"--depth 0\" all.\n\nIs that by design or a bug?\n\n\n\nSebastian\n"},{"id":"110160","messageId":"49D3C300.1040303@hartwork.org","threadId":"18574","inReplyTo":"49CBB490.8040908@hartwork.org","subject":"Re: \"git clone --depth <depth>\" producing history with <depth + 1> commits?","fromName":"Sebastian Pipping","fromEmail":"webmaster@hartwork.org","sentAt":"2009-04-01T19:39:44Z","receivedAt":"2009-04-01T19:39:44Z","isPatch":false,"sender":{"key":"webmaster@hartwork.org","avatar":null},"body":"Sebastian Pipping wrote:\n> Is \"git clone --depth 1 <ropository>\" expected to give a history\n> with 2 commits?  \"--depth 2\" gives 3 commits, \"--depth 0\" all.\n> \n> Is that by design or a bug?\n\nAnyone?  Is \"git clone --depth 1 <ropository>\" really\nsupposed to produce a history holding _two_ commits?  Why so?\n\n\n\nSebastian\n"},{"id":"110178","messageId":"alpine.DEB.1.00.0904020303320.10279@pacific.mpi-cbg.de","threadId":"18574","inReplyTo":"49D3C300.1040303@hartwork.org","subject":"Re: \"git clone --depth <depth>\" producing history with <depth + 1> commits?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-04-02T01:04:58Z","receivedAt":"2009-04-02T01:04:58Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 1 Apr 2009, Sebastian Pipping wrote:\n\n> Sebastian Pipping wrote:\n> > Is \"git clone --depth 1 <ropository>\" expected to give a history\n> > with 2 commits?  \"--depth 2\" gives 3 commits, \"--depth 0\" all.\n> > \n> > Is that by design or a bug?\n> \n> Anyone?  Is \"git clone --depth 1 <ropository>\" really supposed to \n> produce a history holding _two_ commits?  Why so?\n\nBecause storing _no_ commit (according to you, that should happen with \n--depth=0) would make no sense?\n\nAfter all, if you want to clone, you want to clone at least _something_.\n\nCiao,\nDscho\n"},{"id":"110179","messageId":"49D4128D.7000803@hartwork.org","threadId":"18574","inReplyTo":"alpine.DEB.1.00.0904020303320.10279@pacific.mpi-cbg.de","subject":"Re: \"git clone --depth <depth>\" producing history with <depth + 1> commits?","fromName":"Sebastian Pipping","fromEmail":"webmaster@hartwork.org","sentAt":"2009-04-02T01:19:09Z","receivedAt":"2009-04-02T01:19:09Z","isPatch":false,"sender":{"key":"webmaster@hartwork.org","avatar":null},"body":"Johannes Schindelin wrote:\n>> Anyone?  Is \"git clone --depth 1 <ropository>\" really supposed to \n>> produce a history holding _two_ commits?  Why so?\n> \n> Because storing _no_ commit (according to you, that should happen with \n> --depth=0) would make no sense?\n> \n> After all, if you want to clone, you want to clone at least _something_.\n\nI'm aware you need one commit at least.\n\nI didn't think of several branches before.\nI guess that's resolving the core of my question.\n\n\n\n\nSebastian\n"},{"id":"110182","messageId":"7veiwbokd7.fsf@gitster.siamese.dyndns.org","threadId":"18574","inReplyTo":"alpine.DEB.1.00.0904020303320.10279@pacific.mpi-cbg.de","subject":"Re: \"git clone --depth <depth>\" producing history with <depth + 1> commits?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-04-02T02:33:08Z","receivedAt":"2009-04-02T02:33:08Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Wed, 1 Apr 2009, Sebastian Pipping wrote:\n>\n>> Sebastian Pipping wrote:\n>> > Is \"git clone --depth 1 <ropository>\" expected to give a history\n>> > with 2 commits?  \"--depth 2\" gives 3 commits, \"--depth 0\" all.\n>> > \n>> > Is that by design or a bug?\n>> \n>> Anyone?  Is \"git clone --depth 1 <ropository>\" really supposed to \n>> produce a history holding _two_ commits?  Why so?\n>\n> Because storing _no_ commit (according to you, that should happen with \n> --depth=0) would make no sense?\n\nBut then you can error out upon such a request.\n\n> After all, if you want to clone, you want to clone at least _something_.\n\nI am a bit puzzled by your logic.  If one is requested, shouldn't you give\nonly one and not two?\n"},{"id":"110206","messageId":"alpine.DEB.1.00.0904021248080.7464@intel-tinevez-2-302","threadId":"18574","inReplyTo":"7veiwbokd7.fsf@gitster.siamese.dyndns.org","subject":"Re: \"git clone --depth <depth>\" producing history with <depth + 1> commits?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-04-02T11:00:57Z","receivedAt":"2009-04-02T11:00:57Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 1 Apr 2009, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > On Wed, 1 Apr 2009, Sebastian Pipping wrote:\n> >\n> >> Sebastian Pipping wrote:\n> >> > Is \"git clone --depth 1 <ropository>\" expected to give a history \n> >> > with 2 commits?  \"--depth 2\" gives 3 commits, \"--depth 0\" all.\n> >> > \n> >> > Is that by design or a bug?\n> >> \n> >> Anyone?  Is \"git clone --depth 1 <ropository>\" really supposed to \n> >> produce a history holding _two_ commits?  Why so?\n> >\n> > Because storing _no_ commit (according to you, that should happen with \n> > --depth=0) would make no sense?\n> \n> But then you can error out upon such a request.\n\nRight.  Or disable the shallow cloning, as is the case now.\n\n> > After all, if you want to clone, you want to clone at least \n> > _something_.\n> \n> I am a bit puzzled by your logic.  If one is requested, shouldn't you \n> give only one and not two?\n\nReading the OP again, I have to apologize: I missed the fact that there is \nno way to have _just_ one commit.\n\nAnd that is very obviously a bug.\n\nIf nobody beats me to it, I will take care of it this weekend.\n\nCiao,\nDscho\n"}]}