jspm / github

Github Location Service
16 stars 43 forks source link

Use internal git implementation #25

Open guybedford opened 9 years ago

guybedford commented 9 years ago

Should be possible to implement remote-ls through https://github.com/creationix/js-git.

guybedford commented 9 years ago

I have no idea how to implement remote-ls through js-git.

guybedford commented 9 years ago

@Zoltu suggests using https://github.com/libgit2/node-gitteh here instead of js-git.

Git ls-remote is definitely available in the C project (https://libgit2.github.com/libgit2/#HEAD/group/remote/git_remote_ls), but I'm not sure they've set up the bindings for this. That may be possible through a PR.

MicahZoltu commented 9 years ago

Just for clarity, I have never used node-gitteh, it is just the JavaScript wrapper for libgit2 which I am familiar with and is a very popular git library. My only goal with https://github.com/jspm/jspm-cli/issues/634 is to remove the dependency on git, which it sounds like you guys are already planning on doing. I make no claims at knowing the best way to go about that.

MicahZoltu commented 9 years ago

Is this what you need? https://github.com/libgit2/node-gitteh/blob/master/lib/bindings/bindings.js#L242-L255

guybedford commented 9 years ago

Awesome, yes that looks exactly like it.

subesokun commented 9 years ago

This might be also interesting for jspm-git but when using node-gitteh you've to compile libgit2 locally on your machine. Normally that's no issue on Linux but when working on Windows this can be tricky as the installation won't work there out of the box.

MicahZoltu commented 9 years ago

Other projects just distribute the x64 and x86 binaries then point at the right one at runtime. I'm not sure how well that will work here though.

guybedford commented 9 years ago

Yeah that's why js-git seems like a really great option. Apparently it should be possible to do everything with it (https://twitter.com/guybedford/status/554670584094019584), I just have no idea where to start.

guybedford commented 9 years ago

We can probably do this with http://www.nodegit.org/ now?

subesokun commented 9 years ago

Looks very interesting! I think for applications like Atom it make definitely sense to use it but I worry that it's a bit too heavy for jspm, especially if local jspm installs should be supported. I've tried to install nodegit on my Windows PC and luckily if fetched pre-build binaries from some server but it took around 1 1/2 minutes to install it :(

guybedford commented 9 years ago

@subesokun I hadn't tried it out - thanks for checking that out. js-git would still be preferable if we can work that out it seems.

subesokun commented 9 years ago

@guybedford Sure you're welcome. Internally it's using libgit2 and the installation process is downloading in case of Windows a pre-build binary of it.

guybedford commented 8 years ago

Initial work here by @adamburgess in https://github.com/jspm/github/pull/95.