Open guybedford opened 9 years ago
I have no idea how to implement remote-ls
through js-git.
@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.
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.
Is this what you need? https://github.com/libgit2/node-gitteh/blob/master/lib/bindings/bindings.js#L242-L255
Awesome, yes that looks exactly like it.
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.
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.
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.
We can probably do this with http://www.nodegit.org/ now?
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 :(
@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.
@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.
Initial work here by @adamburgess in https://github.com/jspm/github/pull/95.
Should be possible to implement remote-ls through https://github.com/creationix/js-git.