{"thread":{"id":"8698","subject":"cloning empty repo","startedAt":"2007-06-24T15:04:40Z","lastAt":"2007-06-28T01:32:21Z","messageCount":3,"participants":["Marijn Schouten (hkBst)","Shawn O. Pearce","Josh Triplett"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"45672","messageId":"467E8808.7030903@gentoo.org","threadId":"8698","inReplyTo":null,"subject":"cloning empty repo","fromName":"Marijn Schouten (hkBst)","fromEmail":"hkbst@gentoo.org","sentAt":"2007-06-24T15:04:40Z","receivedAt":"2007-06-24T15:04:40Z","isPatch":false,"sender":{"key":"hkbst@gentoo.org","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nHi list,\n\nis there any reason why cloning an empty repository should result in an error\ninstead of a succesfully cloned empty repo?\n\nMarijn\n\nPS Please CC me\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v2.0.4 (GNU/Linux)\nComment: Using GnuPG with Mozilla - http://enigmail.mozdev.org\n\niD8DBQFGfogIp/VmCx0OL2wRAnYXAJ9cJAO4WsQihr6iEsEIawA9cpycQACglI8G\nlofEKfuidJ1OOv12A9QPK8w=\n=p344\n-----END PGP SIGNATURE-----\n"},{"id":"45711","messageId":"20070624230157.GM17393@spearce.org","threadId":"8698","inReplyTo":"467E8808.7030903@gentoo.org","subject":"Re: cloning empty repo","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-06-24T23:01:57Z","receivedAt":"2007-06-24T23:01:57Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Marijn Schouten (hkBst)\" <hkBst@gentoo.org> wrote:\n> is there any reason why cloning an empty repository should result in an error\n> instead of a succesfully cloned empty repo?\n\nThere's nothing to clone.  The repository is empty.\n\nIf you create a Git repository using `git init` and then create\nanother one also using `git init` then both repositories are empty,\nand an empty repository is identical to every other empty repository.\n\nSo if you want to setup an empty repository and then clone nothing,\nyou actually can just setup another empty repository and configure\nthe 'origin' remote:\n\n\tmkdir a; cd a; git init; cd ..\n\n\tmkdir b; cd b; git init\n\t# now a and b are identical\n\n\tgit remote add origin ../a/.git\n\t# now b is a \"clone\" of a's nothingness...\n\n-- \nShawn.\n"},{"id":"45942","messageId":"46830FA5.4020203@freedesktop.org","threadId":"8698","inReplyTo":"20070624230157.GM17393@spearce.org","subject":"Re: cloning empty repo","fromName":"Josh Triplett","fromEmail":"josh@freedesktop.org","sentAt":"2007-06-28T01:32:21Z","receivedAt":"2007-06-28T01:32:21Z","isPatch":false,"sender":{"key":"josh@joshtriplett.org","avatar":"https://avatars.githubusercontent.com/u/162737?v=4"},"body":"Shawn O. Pearce wrote:\n> \"Marijn Schouten (hkBst)\" <hkBst@gentoo.org> wrote:\n>> is there any reason why cloning an empty repository should result in an error\n>> instead of a succesfully cloned empty repo?\n> \n> There's nothing to clone.  The repository is empty.\n> \n> If you create a Git repository using `git init` and then create\n> another one also using `git init` then both repositories are empty,\n> and an empty repository is identical to every other empty repository.\n> \n> So if you want to setup an empty repository and then clone nothing,\n> you actually can just setup another empty repository and configure\n> the 'origin' remote:\n> \n> \tmkdir a; cd a; git init; cd ..\n> \n> \tmkdir b; cd b; git init\n> \t# now a and b are identical\n> \n> \tgit remote add origin ../a/.git\n> \t# now b is a \"clone\" of a's nothingness...\n\nYou can also simulate a clone of any other repository by using a similar\nseries of commands; git clone exists so that you don't have to.  Why not allow\ncloning an empty repository, which would give you an empty repository with the\ncorrect origin remote?\n\n- Josh Triplett\n"}]}