gitteh in current node

47 views
Skip to first unread message

sbusch

unread,
Nov 3, 2012, 7:15:06 PM11/3/12
to nod...@googlegroups.com
Hi all,

I'm using the excellent gitteh module for native libgit2 bindings to implement a storage system for my project. This used to work quite well, until I updated node to v0.9.3. Now, I can't install gitteh through npm anymore, since the build system is not updated to gyp in the npm version. The current master version in the gitteh-repository however seems to be undergoing a major rewrite and does not seem to offer the features I need (I basically need to read and write blobs directly and get/set references). Also, the bindings.js does not seem to reflect the current API.

Any suggestions on how to proceed? Either a way to use the old gitteh version with a current node.js, or how to use the current gitteh version to access blobs directly would be nice.

I would be very much willing to help work on gitteh, since I think good libgit2 bindings for node would be very valuable for a number of projects. If someone currently works on this project, I would like to get in touch to learn more about the current refactoring.

- Stefan

Nathan Rajlich

unread,
Nov 3, 2012, 8:06:13 PM11/3/12
to nod...@googlegroups.com
I was/am looking forward to node-gitteh being updated to use gyp,
unfortunately it took longer than it took for my Raspberry Pi to
arrive, so I ended up just writing a quick little binding to libgit2
using node-ffi (https://github.com/TooTallNate/n8.io/blob/f98776b53b1bcb7efbd2f4c878ef91725f18b902/lib/git.js).
You can take a look at the blog code to see how to use it. It's not
ideal over node-gitteh, but it does the job while we wait.
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

sbusch

unread,
Nov 4, 2012, 2:51:37 PM11/4/12
to nod...@googlegroups.com
Thank you very much for this!

I was not aware something like node-ffi existed, and your git-wrapper was a great starting point for me. I was quickly able to add the functions I need for my project. I think node-ffi is good to write small wrappers without the need to create a 'real' C-module for it. Of course this will never be as optimized as you could accomplish with a real wrapper module, but for quick prototypes it's great. Thank you.

Reply all
Reply to author
Forward
0 new messages