On 2013-09-18, at 10:28, laurent laffont <[email protected]> wrote: > I want to be able to clone Amber github repo from Pharo for AmberOneClick ( > http://www.smalltalkhub.com/#!/~LaurentLaffont/AmberOneClick) > > This: > > ConfigurationOfFileSystemGit loadBleedingEdge. > > git := GitAbstractProtocol url: ' > https://github.com/amber-smalltalk/amber.git'. > git want: git head. > > seems to get data from the git repo, but I do not understand how to create > the directory / local repo on my hard drive. Any hint ?
What you're working with is just the protocol layer of the whole git infrastructure. We never fully finished the protocol layer, so unless you want to fully finish it, I suggest downloading the repository using external tools for now (yes it sucks :P). OSProcess command: 'git clone https://github.com/amber-smalltalk/amber.git' (FileSystemGitRepository on: 'amber.git' asFileReference) head. To continue your original question: "get the compressed git contents" packData := git want: git head. "uncompress them and create an in-image/memory git repository" packFile := GitPackFile readFrom: packData readStream. "get the repository object. Note that this contains everything you need to start opening a FileSystem on it, as described above with FileSystemGitRepository" repository := packFile repository. "copy over the contents of the in-memory repository to the OS FS" repository repository workingDir copyAllTo: 'path/to/amber' asFileReference
signature.asc
Description: Message signed with OpenPGP using GPGMail
