{"thread":{"id":"11958","subject":"Completion message for git-clone?","startedAt":"2008-02-08T03:09:54Z","lastAt":"2008-02-08T16:23:23Z","messageCount":4,"participants":["Ian Dees","Jeff King","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"67886","messageId":"ad4f9af90802071909s4dad180as26b2dd8b7600342f@mail.gmail.com","threadId":"11958","inReplyTo":null,"subject":"Completion message for git-clone?","fromName":"Ian Dees","fromEmail":"undees@gmail.com","sentAt":"2008-02-08T03:09:54Z","receivedAt":"2008-02-08T03:09:54Z","isPatch":false,"sender":{"key":"undees@gmail.com","avatar":null},"body":"Hi, all.  Upon cloning a repository, the initial message reads:\n\n  Initialized empty Git repository in path/to/new-repo/.git\n  0 blocks\n\nI'd wager \"empty\" means, \"empty because Git is about to populate it.\"\nEven so, this wording could be a bit surprising to new adopters,\nespecially coupled with the \"0 blocks\" suffix (is it really creating\nhardlinks on NTFS?).  The impression is that the clone didn't work.\nThe impression is, of course, eventually dispelled by looking inside\nthe new directory.  Is there a way to clarify the overall status of\nthe clone operation?\n\nOne other minor thing I noticed while futzing with clones: if you try\nto clone an empty repository, you get the same \"Initialized empty\nrepository\" message, even though no such second directory is created.\nI'm not suggesting Git should suddenly start allowing empty cloning,\nbut perhaps a \"Empty repository; skipping clone\" message would be\nhelpful.\n\n--Ian\n"},{"id":"67909","messageId":"20080208082957.GA23616@coredump.intra.peff.net","threadId":"11958","inReplyTo":"ad4f9af90802071909s4dad180as26b2dd8b7600342f@mail.gmail.com","subject":"Re: Completion message for git-clone?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-02-08T08:29:57Z","receivedAt":"2008-02-08T08:29:57Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Feb 07, 2008 at 07:09:54PM -0800, Ian Dees wrote:\n\n>   Initialized empty Git repository in path/to/new-repo/.git\n>   0 blocks\n> \n> I'd wager \"empty\" means, \"empty because Git is about to populate it.\"\n> Even so, this wording could be a bit surprising to new adopters,\n> especially coupled with the \"0 blocks\" suffix (is it really creating\n> hardlinks on NTFS?).  The impression is that the clone didn't work.\n> The impression is, of course, eventually dispelled by looking inside\n> the new directory.  Is there a way to clarify the overall status of\n> the clone operation?\n\nThe '0 blocks' actually comes from cpio, because it's hardlinking. I\ncomplained about this when it first appeared, but getting cpio to print\nsomething sane is a bit tricky. However, there has been talk of making\ngit-clone a builtin in the near future, and I suspect it will be much\neasier to generate more user-friendly muessages then. So it is probably\nsimplest to hold your breath and see what comes of that effort (though I\ncan't seem to find any mention of it in the archives...)\n\n> One other minor thing I noticed while futzing with clones: if you try\n> to clone an empty repository, you get the same \"Initialized empty\n> repository\" message, even though no such second directory is created.\n> I'm not suggesting Git should suddenly start allowing empty cloning,\n> but perhaps a \"Empty repository; skipping clone\" message would be\n> helpful.\n\nWhat version are you using? This should be fixed in v1.5.4 (see commit\nef4cffde).\n\n-Peff\n"},{"id":"67919","messageId":"m3ejbn4vis.fsf@localhost.localdomain","threadId":"11958","inReplyTo":"ad4f9af90802071909s4dad180as26b2dd8b7600342f@mail.gmail.com","subject":"Re: Completion message for git-clone?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-02-08T10:01:21Z","receivedAt":"2008-02-08T10:01:21Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"\"Ian Dees\" <undees@gmail.com> writes:\n\n> Hi, all.  Upon cloning a repository, the initial message reads:\n> \n>   Initialized empty Git repository in path/to/new-repo/.git\n>   0 blocks\n> \n> I'd wager \"empty\" means, \"empty because Git is about to populate it.\"\n> Even so, this wording could be a bit surprising to new adopters,\n> especially coupled with the \"0 blocks\" suffix (is it really creating\n> hardlinks on NTFS?).  The impression is that the clone didn't work.\n> The impression is, of course, eventually dispelled by looking inside\n> the new directory.  Is there a way to clarify the overall status of\n> the clone operation?\n\nThis is caused by the fact that for now git-clone is a shell script,\nwhich creates empty repository using git-init (The \"Initialized...\"\nmessage is from git-init), then configures it and populates it.\nFor local clones it uses cpio for hardlinking: the \"0 blocks\" is\nfrom cpio.\n\nIt shouldn't be hard to add message which would confirm successful\ncompletion of the clone if it is local clone; the messages from\ngit-fetch are I think enough indication that clone succeeded...\nbut perhaps we would want to add final message anyway.\n\nNevertheless git-clone waits to be rewritten in C anyway, so\nthere is no much initiative to improve shell version. The stumbling\nblocks are as far as I can remember moving detection of which branch\nis currently checked out to git-remote, and optionally adding\nsymbolic-ref extension to git transfer protocol for git to not have to\nguess which branch is HEAD.\n \n> One other minor thing I noticed while futzing with clones: if you try\n> to clone an empty repository, you get the same \"Initialized empty\n> repository\" message, even though no such second directory is created.\n> I'm not suggesting Git should suddenly start allowing empty cloning,\n> but perhaps a \"Empty repository; skipping clone\" message would be\n> helpful.\n\n$ git clone a b\nInitialized empty Git repository in /tmp/b/.git/\nfatal: cannot clone empty repository\n$ git --version\ngit version 1.5.4\n\nPerhaps git should check if there is anything to clone _before_\ngit-init, or do not remove empty directory after failing to fetch.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"67961","messageId":"ad4f9af90802080823g64b44d27lb870e849e106743b@mail.gmail.com","threadId":"11958","inReplyTo":"m3ejbn4vis.fsf@localhost.localdomain","subject":"Re: Completion message for git-clone?","fromName":"Ian Dees","fromEmail":"undees@gmail.com","sentAt":"2008-02-08T16:23:23Z","receivedAt":"2008-02-08T16:23:23Z","isPatch":false,"sender":{"key":"undees@gmail.com","avatar":null},"body":"Hi, all.\n\nThanks, Jeff and Jakub, for the clarifications.\n\nJakub writes:\n\n> Nevertheless git-clone waits to be rewritten in C anyway, so\n> there is no much initiative to improve shell version\n\nI agree with you.  If it's about to be replaced, there's not much\npoint in making a wording change to the shell script.\n\n> Perhaps git should check if there is anything to clone _before_\n> git-init, or do not remove empty directory after failing to fetch.\n\nI'm not sure that's necessary, as long as that new message is there in\n1.5.4.  I'll hang tight for my distro to pick it up.\n\n--Ian\n"}]}